Module bus.extra

Interface MQProvider


public interface MQProvider
Defines the contract for a Message Queue (MQ) provider engine. Implementations of this interface are responsible for initializing the MQ system and providing access to message producers and consumers.
Since:
Java 17+
Author:
Kimi Liu
  • Method Details

    • init

      MQProvider init(MQConfig config)
      Initializes the MQ provider with the given configuration. This method should be called before any producer or consumer operations are performed.
      Parameters:
      config - The MQConfig containing the necessary configuration details for the MQ provider.
      Returns:
      This MQProvider instance, initialized and ready for use.
    • getProducer

      Producer getProducer()
      Retrieves a Producer instance associated with this MQ provider. The producer is used for sending messages to the MQ system.
      Returns:
      A Producer instance for sending messages.
    • getConsumer

      Consumer getConsumer()
      Retrieves a Consumer instance associated with this MQ provider. The consumer is used for receiving messages from the MQ system.
      Returns:
      A Consumer instance for receiving messages.