public final class AmqpConsume extends Object
AmqpMessage from a given queue.| Constructor and Description |
|---|
AmqpConsume() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AmqpAttributes> |
consume(AmqpConfig config,
AmqpTransactionalConnection connection,
String queueName,
String contentType,
String encoding,
QueueDefinition fallbackQueueDefinition,
ConsumerAckMode ackMode,
String consumerTag,
Long maximumWait,
TimeUnit maximumWaitUnit,
boolean createFallbackQueue,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction)
Operation that allows the user to consume a single
AmqpMessage from a given AMQP.Queue. |
@OutputResolver(output=AmqpOutputResolver.class) @Throws(value=AmqpConsumerErrorTypeProvider.class) @MediaType(value="*/*", strict=false) public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,AmqpAttributes> consume(@Config AmqpConfig config, @Connection AmqpTransactionalConnection connection, @Summary(value="The name of the queue from where the Message should be consumed") String queueName, @Optional @Summary(value="The content type of the message body") @Example(value="application/json") String contentType, @Optional @Summary(value="The encoding of the message body") @Example(value="UTF-8") String encoding, @Optional @Summary(value="The queue definition to use for queue declaration in case there is no queue with the queueName") @Expression(value=NOT_SUPPORTED) QueueDefinition fallbackQueueDefinition, @Optional @Summary(value="The ACK mode to use when consuming a message") ConsumerAckMode ackMode, @Optional @Summary(value="The consumer tag to use for the consumer involved in the operation") String consumerTag, @Optional(defaultValue="10000") @Summary(value="Maximum time to wait for a message to arrive before timeout") Long maximumWait, @Optional(defaultValue="MILLISECONDS") @Example(value="MILLISECONDS") @Summary(value="Time unit to be used in the maximumWaitTime configuration") TimeUnit maximumWaitUnit, @ConfigOverride boolean createFallbackQueue, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction) throws AmqpExtensionException
AmqpMessage from a given AMQP.Queue.config - the current AmqpConfigconnection - the current AmqpTransactionalConnectionqueueName - The name of the queue from where the Message should be consumedcontentType - The content type of the message bodyencoding - The encoding of the message bodyfallbackQueueDefinition - The queue definition to use for queue declaration in case there is no queue with the queueNameackMode - The ACK mode to use when consuming a messageconsumerTag - The consumer tag to use for the consumer involved in the operationmaximumWait - Maximum time to wait for a message to arrive before timeoutmaximumWaitUnit - Time unit to be used in the maximumWaitTime configurationtransactionalAction - information of the current transaction in case it existsAmqpExtensionException - if an error occursCopyright © 2019 MuleSoft, Inc.. All rights reserved.