Class JmsXaPollingMessageConsumerDelegate

java.lang.Object
org.mule.jms.commons.internal.source.polling.JmsXaPollingMessageConsumerDelegate
All Implemented Interfaces:
MessageConsumerDelegate

public class JmsXaPollingMessageConsumerDelegate extends Object implements MessageConsumerDelegate
MessageConsumerDelegate implementation which consumes messages inside XA Transactions doing polling.
Since:
1.0.0
  • Constructor Details

  • Method Details

    • createConsumers

      public void createConsumers(int numberOfConsumers) throws org.mule.runtime.api.connection.ConnectionException
      Creates and start N consumers, where N is defined by the param numberOfConsumers.
      Specified by:
      createConsumers in interface MessageConsumerDelegate
      Parameters:
      numberOfConsumers - number of consumers to create and start.
      Throws:
      org.mule.runtime.api.connection.ConnectionException - If an error occurs trying to create and start the consumers.
    • onSuccess

      public void onSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext)
      Communicates when a message has been successfully processed in a flow.
      Specified by:
      onSuccess in interface MessageConsumerDelegate
      Parameters:
      callbackContext - Context with references of the processed message.
    • onError

      public void onError(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext, org.mule.runtime.api.message.Error error)
      Communicates when a message has not been successfully processed in a flow.
      Specified by:
      onError in interface MessageConsumerDelegate
      Parameters:
      callbackContext - Context with references of the processed message.
      error - Produced error on the flow.
    • reschedulePolling

      protected void reschedulePolling(Runnable runnable)
    • stop

      public void stop()
      Request to stop all the message consumers.
      Specified by:
      stop in interface MessageConsumerDelegate
    • disableConsumers

      public void disableConsumers()
      Specified by:
      disableConsumers in interface MessageConsumerDelegate