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
Initializes the MQ provider with the given configuration. This method should be called before any producer or consumer operations are performed.- Parameters:
config- TheMQConfigcontaining the necessary configuration details for the MQ provider.- Returns:
- This
MQProviderinstance, initialized and ready for use.
-
getProducer
Producer getProducer()Retrieves aProducerinstance associated with this MQ provider. The producer is used for sending messages to the MQ system.- Returns:
- A
Producerinstance for sending messages.
-
getConsumer
Consumer getConsumer()Retrieves aConsumerinstance associated with this MQ provider. The consumer is used for receiving messages from the MQ system.- Returns:
- A
Consumerinstance for receiving messages.
-