JMS outbound channel adapter
Sends messages to a JMS destination.
Sends JMS messages to the specified destination at the connection created by the Connection factory
The other system is assumed to receive the JMS Messages from the JMS Destination.
This system may or may not be a Spring Integration application. Of course, when sending the Spring Integration Message instance as the body of the JMS Message itself (with the 'extract-payload' value set to false), it is assumed that the other system is based on Spring Integration.
If necessary, the message payload can be extracted and transformed using a converter.
Connection factory
Reference to a JMS connection factory used for creating connections.
Required
Note: The connection factory should return pooled connections as well as pooled sessions and message producers, otherwise performance of JMS operations is going to suffer. Consider using a caching connection factory to achieve this.
Destination name
Name of the destination to which JMS Messages will be sent (typically the name of a JMS queue or topic).
This attribute is mutually exclusive with destination expression.
Pub-sub domain
Whether the publish-subscribe domain (JMS Topics) should be used for resolving the destination name or not.
Default is false, indicating that the point-to-point domain (JMS Queues) should be used.
Extract payload
If enabled, the Spring message payload will be converted by the Message converter and passed as the JMS Message body. If disabled, the Spring Integration Message itself is passed as the JMS Message body.
Default: true
Message converter
Reference to a converter for converting the Spring Integration message payload to/from a JMS message.
When not specified, a SimpleMessageConverter will be used. This converter converts a string to a TextMessage, a byte array to a BytesMessage
, a Map to a MapMessage
, and a serializable objectto an ObjectMessage
.
Use a JMS XML Message Converter for XML messages that are not already in a string-representation.
Destination expression
A SpEL expression to be evaluated at runtime against each message. The result should be a string representing the destination name. If the evaluation result is null
, messages will be sent to the default destination of the underlying JmsTemplate
.
This attribute is mutually exclusive with destination name.
Session transacted
Setting this option to true
enables transactions for the message send. If there is already a JMS transaction in process, perhaps from a JMS message driven channel adapter upstream, the same transaction is used; otherwise a new transaction is started.
Default is false
.
Explicit QoS enabled
If true, then the values of deliveryPersistent, priority, and timeToLive will be used when sending a message. Otherwise, the default values, that may be set administratively, will be used.
Default is false.
Delivery persistent
Specifies whether message delivery should be persistent or non-persistent. This will set the delivery mode accordingly, to either PERSISTENT (true) or NON_PERSISTENT (false).
Since a default value may be defined administratively, this is only used when explicitQosEnabled is set to true.
Default it true (delivery mode PERSISTENT).
Priority
Set the priority of a message when sending.
Since a default value may be defined administratively, this is only used when explicitQosEnabled is set to true.
Default is 4
.
Time to live
Specifies the time-to-live (in milliseconds) of the message when sending.
Since a default value may be defined administratively, this is only used when explicitQosEnabled is set to true.
Default is unlimited (0
): messages will never expire.
Advice can be added to change the behaviour of this endpoint, for example to add retry logic in case of failures. The following types of advice are available:
Retry advice: allows configuration of sophisticated retry scenarios; this includes specifying policies for retry attemps, backoff periods between attempts and the recovery strategy when retries are exhausted Circuit breaker: if a certain number of consecutive attempts fails, new requests will fail fast and no attempt will be made to invoke the request handler again until some time has expired Expression evaluating advice: general advice that evaluates a configurable SpEL expression on successful and/or failed attempts, and optionally can send a message to a success channel and/or failure channel
By adding multiple advices to this endpoint you can create even more complex combined behaviour. For example, if you add a circuit breaker and a retry advice, you can create a scenario where the circuit breaker only opens when all retries are exhaused. Note that the order of the advice types is important, as switching the order will change the combined behaviour: the first item in the list will be the top of the advice chain, meaning it will be the last advice that is evaluated. Also note that if any advice "traps" exceptions, all advices higher up in the chain won't know about any failures.
Channel
Channel to consume messages from.
Required
Id
Name that uniquely identifies this flow component.
Required