Interface SubscriberFactory
- All Known Implementing Classes:
PollingTypeSubscriberFactory,PrefetchTypeSubscriberFactory
public interface SubscriberFactory
Generic factory pattern for creating
MQSubscriber instances-
Method Summary
Modifier and TypeMethodDescriptiondefault MQSubscribercreateSubscriber(String subscriberName, com.mulesoft.mq.restclient.internal.Destination destination, SubscriberAckMode ackMode, long ackTimeout, com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker, org.mule.runtime.api.scheduler.SchedulerService schedulerService, org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream, AnypointMQMessageAttributes> callback, int primaryRegionStatusCheckIntervalMs, int fallbackMessagesCheckIntervalMs, boolean fallbackFeatureSystemPropertyEnabled) Deprecated.createSubscriber(String subscriberName, com.mulesoft.mq.restclient.internal.Destination destination, SubscriberAckMode ackMode, long ackTimeout, com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker, org.mule.runtime.api.scheduler.SchedulerService schedulerService, org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream, AnypointMQMessageAttributes> callback, int primaryRegionStatusCheckIntervalMs, int fallbackMessagesCheckIntervalMs, boolean fallbackFeatureSystemPropertyEnabled, FlowProcessingTracker flowProcessingTracker) Factory method for obtaining new instances ofMQSubscriber.
-
Method Details
-
createSubscriber
@Deprecated default MQSubscriber createSubscriber(String subscriberName, com.mulesoft.mq.restclient.internal.Destination destination, SubscriberAckMode ackMode, long ackTimeout, com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker, org.mule.runtime.api.scheduler.SchedulerService schedulerService, org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream, AnypointMQMessageAttributes> callback, int primaryRegionStatusCheckIntervalMs, int fallbackMessagesCheckIntervalMs, boolean fallbackFeatureSystemPropertyEnabled) Deprecated.Factory method for obtaining new instances ofMQSubscriber. Every call to this method should return new instances of the same subscriber implementation.- Parameters:
subscriberName- the id name of the subscriber for a given applicationdestination- the destination to subscribe for messagesackMode- theSubscriberAckModeto be used by the subscriberackTimeout- the acknowledgement timeout TTL to be used when fetching messagescircuitBreaker- theMQCircuitBreakerassociated to this subscriberschedulerService- the service to use when creating subscribing threadscallback- callback to be used for dispatching to the application the messages being fetchedprimaryRegionStatusCheckIntervalMs- interval for checking primary region statusfallbackMessagesCheckIntervalMs- interval for checking fallback messagesfallbackFeatureSystemPropertyEnabled- whether fallback feature is enabled- Returns:
- a new instance of an
MQSubscriber
-
createSubscriber
MQSubscriber createSubscriber(String subscriberName, com.mulesoft.mq.restclient.internal.Destination destination, SubscriberAckMode ackMode, long ackTimeout, com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker, org.mule.runtime.api.scheduler.SchedulerService schedulerService, org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream, AnypointMQMessageAttributes> callback, int primaryRegionStatusCheckIntervalMs, int fallbackMessagesCheckIntervalMs, boolean fallbackFeatureSystemPropertyEnabled, FlowProcessingTracker flowProcessingTracker) Factory method for obtaining new instances ofMQSubscriber. Every call to this method should return new instances of the same subscriber implementation.- Parameters:
subscriberName- the id name of the subscriber for a given applicationdestination- the destination to subscribe for messagesackMode- theSubscriberAckModeto be used by the subscriberackTimeout- the acknowledgement timeout TTL to be used when fetching messagescircuitBreaker- theMQCircuitBreakerassociated to this subscriberschedulerService- the service to use when creating subscribing threadscallback- callback to be used for dispatching to the application the messages being fetchedprimaryRegionStatusCheckIntervalMs- interval for checking primary region statusfallbackMessagesCheckIntervalMs- interval for checking fallback messagesfallbackFeatureSystemPropertyEnabled- whether fallback feature is enabledflowProcessingTracker- tracker for coordinating between message fetch and flow processing- Returns:
- a new instance of an
MQSubscriber - Since:
- 4.0.14
-
createSubscriber(String, Destination, SubscriberAckMode, long, MQCircuitBreaker, SchedulerService, SourceCallback, int, int, boolean, FlowProcessingTracker)instead