Some clean up for jms.adoc
This commit is contained in:
@@ -213,14 +213,11 @@ In that case, the attributes on the adapter are transferred to an instance of yo
|
||||
You can't use the Spring JMS namespace element `<jms:listener-container/>` to configure a container reference for the `<int-jms:message-driven-channel-adapter>` since that element doesn't actually reference a container.
|
||||
Each `<jms:listener/>` sub-element gets its own `DefaultMessageListenerContainer` (with shared attributes defined on the parent `<jms:listener-container/>` element).
|
||||
You can give each listener sub-element an `id`, and use that to inject into the channel adapter, however, the `<jms:/>` namespace requires a real listener.
|
||||
Since, for Spring Integration, the adapter itself needs to configure the listener, the configured listener will be overwritten.
|
||||
If you go this route, you will see a warning for each adapter.
|
||||
|
||||
It is recommended to configure a regular `<bean>` for the `DefaultMessageListenerContainer` and use it as a reference in the channel adapter.
|
||||
=====
|
||||
|
||||
IMPORTANT: Starting with version 4.2, the default `acknowledge` mode is `transacted`, unless you provide an external
|
||||
container.
|
||||
IMPORTANT: Starting with version 4.2, the default `acknowledge` mode is `transacted`, unless you provide an external container.
|
||||
In that case, you should configure the container as needed.
|
||||
We recommend using `transacted` with the `DefaultMessageListenerContainer` to avoid message loss.
|
||||
|
||||
@@ -578,8 +575,7 @@ The complete correlation data is used to route the reply to the correct requesti
|
||||
|
||||
. A `reply-destination*` property is provided a `<reply-listener/>` is provided, and `correlation-key="myCorrelationHeader"`
|
||||
+
|
||||
The gateway has a unique correlation ID and inserts it, together with an incrementing value in the `myCorrelationHeader`
|
||||
property (`gatewayId + "_" + ++seq`).
|
||||
The gateway has a unique correlation ID and inserts it, together with an incrementing value in the `myCorrelationHeader` property (`gatewayId + "_" + ++seq`).
|
||||
The `correlation-key` can be any user-defined value.
|
||||
The message selector is:
|
||||
+
|
||||
@@ -609,7 +605,7 @@ If `async` is `true`, the requesting thread is released immediately after the se
|
||||
This can be useful when the gateway is invoked on a poller thread.
|
||||
The thread is released and is available for other tasks within the framework.
|
||||
|
||||
`async` requires a `<reply-listener/>` (or `setUseReplyContainer(true)` when using Java configuration).
|
||||
Thee `async` requires a `<reply-listener/>` (or `setUseReplyContainer(true)` when using Java configuration).
|
||||
It also requires a `correlationKey` (usually `JMSCorrelationID`) to be specified.
|
||||
If either of these conditions are not met, `async` is ignored.
|
||||
|
||||
@@ -707,7 +703,7 @@ You can use only one of those three attributes.
|
||||
<20> A SpEL expression evaluating to a `Destination` to which request messages are sent.
|
||||
The expression can result in a `Destination` object or a `String`.
|
||||
It is used by the `DestinationResolver` to resolve the actual `Destination`.
|
||||
Oneof `reply-destination`, `reply-destination-expression`, or `reply-destination-name` is required.
|
||||
One of the `reply-destination`, `reply-destination-expression`, or `reply-destination-name` is required.
|
||||
You can use only one of those three attributes.
|
||||
<21> The name of the destination to which request messages are sent.
|
||||
It is used by the `DestinationResolver` to resolve the actual `Destination`.
|
||||
@@ -891,10 +887,7 @@ myHeaderProperty = 'something'
|
||||
----
|
||||
====
|
||||
|
||||
Message selector expressions are a subset of the https://en.wikipedia.org/wiki/SQL-92[SQL-92] conditional expression syntax and are defined as part of the https://download.oracle.com/otn-pub/jcp/7195-jms-1.1-fr-spec-oth-JSpec/jms-1_1-fr-spec.pdf[Java Message Service] specification (Version 1.1, April 12, 2002).
|
||||
Specifically, see chapter "3.8, Message Selection".
|
||||
It contains a detailed explanation of the expressions syntax.
|
||||
|
||||
Message selector expressions are a subset of the https://en.wikipedia.org/wiki/SQL-92[SQL-92] conditional expression syntax and are defined as part of the https://docs.oracle.com/cd/E19798-01/821-1841/bncer/index.html[Java Message Service] specification.
|
||||
You can specify the JMS message `selector` attribute by using XML namespace configuration for the following Spring Integration JMS components:
|
||||
|
||||
* JMS Channel
|
||||
@@ -908,13 +901,13 @@ IMPORTANT: You cannot reference message body values by using JMS Message selecto
|
||||
[[jms-samples]]
|
||||
=== JMS Samples
|
||||
|
||||
To experiment with these JMS adapters, check out the JMS samples available in the Spring Integration Samples Git repository at https://github.com/SpringSource/spring-integration-samples/tree/master/basic/jms[https://github.com/SpringSource/spring-integration-samples/tree/master/basic/jms].
|
||||
To experiment with these JMS adapters, check out the JMS samples available in the Spring Integration Samples Git repository at https://github.com/SpringSource/spring-integration-samples/tree/master/basic/jms[https://github.com/spring-projects/spring-integration-samples/tree/master/basic/jms].
|
||||
|
||||
That repository includes two samples.
|
||||
One provides inbound and outbound channel adapters, and the other provides inbound and outbound gateways.
|
||||
They are configured to run with an embedded https://activemq.apache.org/[ActiveMQ] process, but you can modify the https://github.com/SpringSource/spring-integration-samples/blob/master/basic/jms/src/main/resources/META-INF/spring/integration/common.xml[common.xml] Spring application context file of each sample to support either a different JMS provider or a standalone ActiveMQ process.
|
||||
They are configured to run with an embedded https://activemq.apache.org/[ActiveMQ] process, but you can modify the https://github.com/spring-projects/spring-integration-samples/blob/master/basic/jms/src/main/resources/META-INF/spring/integration/common.xml[common.xml] Spring application context file of each sample to support either a different JMS provider or a standalone ActiveMQ process.
|
||||
|
||||
In other words, you can split the configuration so that the inbound and outbound adapters run in separate JVMs.
|
||||
If you have ActiveMQ installed, modify the `brokerURL` property within the common.xml file to use `tcp://localhost:61616` (instead of `vm://localhost`).
|
||||
If you have ActiveMQ installed, modify the `brokerURL` property within the `common.xml` file to use `tcp://localhost:61616` (instead of `vm://localhost`).
|
||||
Both of the samples accept input from stdin and echo back to stdout.
|
||||
Look at the configuration to see how these messages are routed over JMS.
|
||||
|
||||
Reference in New Issue
Block a user