public class JmsMessageListenerDelegate extends Object implements MessageConsumerDelegate
MessageConsumerDelegate implementation which uses MessageListener| Constructor and Description |
|---|
JmsMessageListenerDelegate(JmsMessageListenerFactory messageListenerFactory,
JmsConnection connection,
JmsSupport jmsSupport,
ConsumerType consumerType,
String destination,
JmsConfig config,
InternalAckMode resolvedAckMode,
String selector,
JmsListenerLockFactory lockFactory,
JmsResourceReleaser resourceCleaner) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeConsumerQuietly(MessageListenerContext info) |
void |
createConsumers(int numberOfConsumers)
Creates and start N consumers, where N is defined by the param
numberOfConsumers. |
protected void |
disableConsumerListener(MessageListenerContext info) |
void |
disableConsumers() |
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 |
stop()
Request to stop all the message consumers.
|
public JmsMessageListenerDelegate(JmsMessageListenerFactory messageListenerFactory, JmsConnection connection, JmsSupport jmsSupport, ConsumerType consumerType, String destination, JmsConfig config, InternalAckMode resolvedAckMode, String selector, JmsListenerLockFactory lockFactory, JmsResourceReleaser resourceCleaner)
public void createConsumers(int numberOfConsumers)
throws org.mule.runtime.api.connection.ConnectionException
numberOfConsumers.createConsumers in interface MessageConsumerDelegatenumberOfConsumers - number of consumers to create and start.org.mule.runtime.api.connection.ConnectionException - If an error occurs trying to create and start the consumers.public void onSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext)
onSuccess in interface MessageConsumerDelegatecallbackContext - Context with references of the processed message.public void stop()
stop in interface MessageConsumerDelegatepublic void disableConsumers()
disableConsumers in interface MessageConsumerDelegateprotected void disableConsumerListener(MessageListenerContext info)
protected void closeConsumerQuietly(MessageListenerContext info)
public void onError(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext,
org.mule.runtime.api.message.Error error)
onError in interface MessageConsumerDelegatecallbackContext - Context with references of the processed message.error - Produced error on the flow.Copyright © 2022. All rights reserved.