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 TypeMethodDescriptionvoidcreateConsumers(int numberOfConsumers) Creates and start N consumers, where N is defined by the paramnumberOfConsumers.voidvoidonError(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.voidonSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) Communicates when a message has been successfully processed in a flow.voidstop()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 paramnumberOfConsumers.- 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()
-