public final class JmsConsume extends Object
Message from a given Destination| Constructor and Description |
|---|
JmsConsume() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<Object,JmsAttributes> |
consume(JmsConnection connection,
JmsConfig config,
String destination,
ConsumerType consumerType,
AckMode ackMode,
String selector,
String contentType,
String encoding,
Long maximumWait,
TimeUnit maximumWaitUnit)
Operation that allows the user to consume a single
Message from a given Destination. |
@OutputResolver(output=JmsOutputResolver.class) @Throws(value=JmsConsumeErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<Object,JmsAttributes> consume(@Connection JmsConnection connection, @UseConfig JmsConfig config, @XmlHints(allowReferences=false) @Summary(value="The name of the Destination from where the Message should be consumed") String destination, @Optional @Summary(value="The Type of the Consumer that should be used for the provided destination") ConsumerType consumerType, @Optional @Summary(value="The Session ACK mode to use when consuming a message") AckMode ackMode, @Optional @Summary(value="JMS selector to be used for filtering incoming messages") String selector, @Optional @Summary(value="The content type of the message body") String contentType, @Optional @Summary(value="The encoding of the message body") String encoding, @Optional(defaultValue="10000") @Summary(value="Maximum time to wait for a message to arrive before timeout") Long maximumWait, @Optional(defaultValue="MILLISECONDS") @Summary(value="Time unit to be used in the maximumWaitTime configuration") TimeUnit maximumWaitUnit) throws JmsExtensionException
Message from a given Destination.connection - the current JmsConnectionconfig - the current JmsConsumerConfigdestination - the name of the Destination from where the Message should be consumedconsumerType - the type of the MessageConsumer that is required for the given destination, along with any
extra configurations that are required based on the destination type.ackMode - the AckMode that will be configured over the Message and Sessionselector - a custom JMS selector for filtering the messagescontentType - the Message's content content typeencoding - the Message's content encodingmaximumWait - maximum time to wait for a message before timing outmaximumWaitUnit - Time unit to be used in the maximumWaitTime configurationsResult with the Message content as Result.getOutput() and its properties
and headers as Result.getAttributes()JmsConsumeException - if an error occursJmsExtensionExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.