@Throws(value=AnypointMQErrorTypeProvider.class) public class AnypointMQOperations extends Object
| Constructor and Description |
|---|
AnypointMQOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(AnypointMQConfiguration config,
AnypointMQConnection connection,
AnypointMQMessageContext messageContext)
Executes an Acknowledgement over a given
AnypointMQMessageContext indicating that the
message has been consumed correctly and deletes the message from In Flight status. |
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AnypointMQMessageContext> |
consume(AnypointMQConfiguration config,
AnypointMQConnection connection,
String destination,
ConsumerAckMode acknowledgementMode,
Long pollingTime,
Long acknowledgementTimeout) |
void |
nack(AnypointMQConfiguration config,
AnypointMQConnection connection,
AnypointMQMessageContext messageContext)
Executes an Not Acknowledgement over a given
AnypointMQMessageContext and change the
status of the message from In Flight to In Queue to be consumed again for a
subscriber |
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AnypointMqMessagePublishAttributes> |
publish(AnypointMQConfiguration config,
AnypointMQConnection connection,
String destination,
org.mule.runtime.api.metadata.TypedValue<InputStream> body,
String messageId,
boolean sendContentType,
Map<String,String> properties) |
@MediaType(value="*/*",
strict=false)
public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AnypointMqMessagePublishAttributes> publish(@Config
AnypointMQConfiguration config,
@Connection
AnypointMQConnection connection,
String destination,
@Content(primary=true) @Optional(defaultValue="#[payload]")
org.mule.runtime.api.metadata.TypedValue<InputStream> body,
@Placement(tab="Advanced") @Optional
String messageId,
@Placement(tab="Advanced") @Optional(defaultValue="true")
boolean sendContentType,
@Optional
Map<String,String> properties)
config - The Configuration of the connector.connection - The connection to Anypoint MQ.destination - Queue or Exchange name from where to fetch a MessagemessageId - ID of the message to publishsendContentType - Indicates whether the content type of the Mule Message should be
attached or notproperties - Additional properties to be sent within the messagebody - Body of the message@MediaType(value="*/*",
strict=false)
public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AnypointMQMessageContext> consume(@Config
AnypointMQConfiguration config,
@Connection
AnypointMQConnection connection,
String destination,
@Optional(defaultValue="MANUAL")
ConsumerAckMode acknowledgementMode,
@Optional(defaultValue="10000")
Long pollingTime,
@Optional(defaultValue="0")
Long acknowledgementTimeout)
config - The Configuration of the connector.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 from
this subscriber. Can be only used 'MANUAL' or 'NONE'.pollingTime - How much time (milliseconds) to be waited if the requested
messages are not ready to be consumed.acknowledgementTimeout - Duration that a message is held by a broker waiting for an
Acknowledgement or Not Acknowledgement. After that duration
expires, the message is again available to any subscriber.byte[] with the body of the message and AnypointMQMessageContext with
the metadata of it.public void ack(@Config
AnypointMQConfiguration config,
@Connection
AnypointMQConnection connection,
@Expression(value=REQUIRED)
AnypointMQMessageContext messageContext)
AnypointMQMessageContext indicating that the
message has been consumed correctly and deletes the message from In Flight status.config - The Configuration of the connector.connection - The connection to Anypoint MQ.messageContext - AnypointMQMessageContext that represents the received messagepublic void nack(@Config
AnypointMQConfiguration config,
@Connection
AnypointMQConnection connection,
@Expression(value=REQUIRED)
AnypointMQMessageContext messageContext)
AnypointMQMessageContext and change the
status of the message from In Flight to In Queue to be consumed again for a
subscriberconfig - The Configuration of the connector.connection - The connection to Anypoint MQ.messageContext - AnypointMQMessageContext that represents the received messageCopyright © 2018 MuleSoft, Inc.. All rights reserved.