public class AnypointMQOperations extends Object
| Constructor and Description |
|---|
AnypointMQOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(AnypointMQConnection connection,
String ackToken,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Executes an Acknowledgement indicating that the message has been consumed
correctly and deletes the message from
In Flight status. |
void |
consume(AnypointMQConnection connection,
String destination,
ConsumerAckMode acknowledgementMode,
long acknowledgementTimeout,
TimeUnit acknowledgementTimeoutUnit,
long pollingTime,
TimeUnit pollingTimeUnit,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,AnypointMQMessageAttributes> callback) |
void |
nack(AnypointMQConnection connection,
String ackToken,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Executes an Not Acknowledgement and change the status of the message
from
In Flight to In Queue to be consumed again for a
subscriber |
void |
publish(org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
AnypointMQConnection connection,
String destination,
AnypointMQMessageGroup messageGroup,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,AnypointMQMessagePublishAttributes> callback) |
@MediaType(value="*/*",
strict=false)
@Throws(value=AnypointMQPublishErrorTypeProvider.class)
public void publish(org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
@Connection
AnypointMQConnection connection,
@DisplayName(value="Destination") @Summary(value="The name of the Queue or Exchange where the message should be published")
String destination,
@ParameterGroup(name="Message")
AnypointMQMessageGroup messageGroup,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,AnypointMQMessagePublishAttributes> callback)
throws org.mule.runtime.api.connection.ConnectionException
streamingHelper - Mule StreamingHelper.connection - The connection to Anypoint MQ.destination - Queue or Exchange name from where to fetch a Messageorg.mule.runtime.api.connection.ConnectionException@MediaType(value="*/*",
strict=false)
@Throws(value=AnypointMQConsumeErrorTypeProvider.class)
public void consume(@Connection
AnypointMQConnection connection,
@DisplayName(value="Queue") @Summary(value="The name of the Queue from which to consume a message")
String destination,
@Summary(value="The Acknowledgement mode to use on the consumed message") @Optional(defaultValue="IMMEDIATE")
ConsumerAckMode acknowledgementMode,
@Summary(value="Duration that a message is held by a consumer waiting for an ACK or NACK, before returning to the Queue for redelivery") @Optional(defaultValue="0")
long acknowledgementTimeout,
@Summary(value="Time unit to be used in the acknowledgementTimeout configuration") @Optional(defaultValue="MILLISECONDS")
TimeUnit acknowledgementTimeoutUnit,
@Summary(value="How much time to be waited if the requested messages are not ready to be consumed") @Optional(defaultValue="10000")
long pollingTime,
@Summary(value="Time unit to be used in the pollingTime configuration") @Optional(defaultValue="MILLISECONDS")
TimeUnit pollingTimeUnit,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,AnypointMQMessageAttributes> callback)
throws org.mule.runtime.api.connection.ConnectionException
connection - The connection to Anypoint MQ.destination - Queue or Exchange name from where to fetch a MessageacknowledgementMode - Acknowledgement mode to use for the messages retrieved.acknowledgementTimeout - Duration that a message is held by a consumer waiting for an Acknowledgement or Not
Acknowledgement. After that duration elapses, the message is again available to any
consumer.acknowledgementTimeoutUnit - Time unit to be used in the acknowledgementTimeout configurationpollingTime - How much time to be waited if the requested messages are not ready to be consumed.pollingTimeUnit - Time unit to be used in the pollingTime configurationorg.mule.runtime.api.connection.ConnectionException@Throws(value=AnypointMQAckErrorTypeProvider.class) public void ack(@Connection AnypointMQConnection connection, @Summary(value="The `ackToken` of the message, which was received when message was consumed") String ackToken, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback) throws org.mule.runtime.api.connection.ConnectionException
In Flight status.connection - The connection to Anypoint MQ.ackToken - The `ackToken` of the message, which was received when message was consumed.
`ackToken` will only be created when acknowledgementMode="MANUAL" is used.org.mule.runtime.api.connection.ConnectionException@Throws(value=AnypointMQNackErrorTypeProvider.class) public void nack(@Connection AnypointMQConnection connection, @Summary(value="The `ackToken` of the message, which was received when message was consumed") String ackToken, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback) throws org.mule.runtime.api.connection.ConnectionException
In Flight to In Queue to be consumed again for a
subscriberconnection - The connection to Anypoint MQ.ackToken - The `ackToken` of the message, which was received when message was consumed.
`ackToken` will only be created when acknowledgementMode="MANUAL" is used.org.mule.runtime.api.connection.ConnectionExceptionCopyright © 2025 MuleSoft, Inc.. All rights reserved.