Interface SubscriberFactory

All Known Implementing Classes:
PollingTypeSubscriberFactory, PrefetchTypeSubscriberFactory

public interface SubscriberFactory
Generic factory pattern for creating MQSubscriber instances
  • 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)
      Factory method for obtaining new instances of MQSubscriber. 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 application
      destination - the destination to subscribe for messages
      ackMode - the SubscriberAckMode to be used by the subscriber
      ackTimeout - the acknowledgement timeout TTL to be used when fetching messages
      circuitBreaker - the MQCircuitBreaker associated to this subscriber
      schedulerService - the service to use when creating subscribing threads
      callback - callback to be used for dispatching to the application the messages being fetched
      primaryRegionStatusCheckIntervalMs - interval for checking primary region status
      fallbackMessagesCheckIntervalMs - interval for checking fallback messages
      fallbackFeatureSystemPropertyEnabled - 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 of MQSubscriber. 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 application
      destination - the destination to subscribe for messages
      ackMode - the SubscriberAckMode to be used by the subscriber
      ackTimeout - the acknowledgement timeout TTL to be used when fetching messages
      circuitBreaker - the MQCircuitBreaker associated to this subscriber
      schedulerService - the service to use when creating subscribing threads
      callback - callback to be used for dispatching to the application the messages being fetched
      primaryRegionStatusCheckIntervalMs - interval for checking primary region status
      fallbackMessagesCheckIntervalMs - interval for checking fallback messages
      fallbackFeatureSystemPropertyEnabled - whether fallback feature is enabled
      flowProcessingTracker - tracker for coordinating between message fetch and flow processing
      Returns:
      a new instance of an MQSubscriber
      Since:
      4.0.14