public class JmsXaPollingMessageConsumerDelegate extends Object implements MessageConsumerDelegate
MessageConsumerDelegate implementation which consumes messages inside XA Transactions doing polling.| Constructor and Description |
|---|
JmsXaPollingMessageConsumerDelegate(JmsTransactionalConnection connection,
JmsSupport jmsSupport,
String destination,
ConsumerType consumerType,
JmsConfig config,
String selector,
JmsSessionManager sessionManager,
org.mule.runtime.api.connection.ConnectionProvider connectionProvider,
org.mule.runtime.api.scheduler.Scheduler scheduler,
String inboundContentType,
String inboundEncoding,
org.mule.runtime.extension.api.runtime.source.SourceCallback sourceCallback,
JmsConnectionExceptionResolver exceptionResolver) |
| Modifier and Type | Method and Description |
|---|---|
void |
createConsumers(int numberOfConsumers)
Creates and start N consumers, where N is defined by the param
numberOfConsumers. |
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.
|
protected void |
reschedulePolling(Runnable runnable) |
void |
stop()
Request to stop all the message consumers.
|
public JmsXaPollingMessageConsumerDelegate(JmsTransactionalConnection connection, JmsSupport jmsSupport, String destination, ConsumerType consumerType, JmsConfig config, String selector, JmsSessionManager sessionManager, org.mule.runtime.api.connection.ConnectionProvider connectionProvider, org.mule.runtime.api.scheduler.Scheduler scheduler, String inboundContentType, String inboundEncoding, org.mule.runtime.extension.api.runtime.source.SourceCallback sourceCallback, JmsConnectionExceptionResolver exceptionResolver)
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 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.protected void reschedulePolling(Runnable runnable)
public void stop()
stop in interface MessageConsumerDelegatepublic void disableConsumers()
disableConsumers in interface MessageConsumerDelegateCopyright © 2019. All rights reserved.