Interface MessageConsumerDelegate

All Known Implementing Classes:
JmsMessageListenerDelegate, JmsXaPollingMessageConsumerDelegate

public interface MessageConsumerDelegate
Strategy interface for different implementations of a JMS Message Consumer
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createConsumers(int numberOfConsumers)
    Creates and start N consumers, where N is defined by the param numberOfConsumers.
    void
     
    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.
    void
    onSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext)
    Communicates when a message has been successfully processed in a flow.
    void
    Request to stop all the message consumers.
  • Method Details

    • createConsumers

      void createConsumers(int numberOfConsumers) throws org.mule.runtime.api.connection.ConnectionException
      Creates and start N consumers, where N is defined by the param numberOfConsumers.
      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

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

      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.
      Parameters:
      callbackContext - Context with references of the processed message.
      error - Produced error on the flow.
    • stop

      void stop()
      Request to stop all the message consumers.
    • disableConsumers

      void disableConsumers()