Closed choda closed 2 years ago
You observation is correct: the intention was really to demonstrate different options for configuring a destination.
If you pay attention the XML one even doesn't have a ConnectionFactory
. It resolves one from the jmsConnectionFactory
bean name.
I made such a discrepancy deliberately to indicate that there are more than just one destination
option to configure.
I didn't think originally that this can cause some confusion. The other places in this reference even don't have just Java samples, not talking already about DSL and Kotlin.
If you still find this hard digesting, feel free to open Pull Request with possible fix: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc
Thank you for understanding!
That's fine by me. Thanks!
Not a big issue here, but there is a small discrepancy in the Reference Guide in its current (5.5.13) version, regarding the definition of a JMS Outbound Channel Adapter between XML and Java Config versions.
The XML definition uses the
destination
parameter to set<int-jms:outbound-channel-adapter id="jmsOut" destination="outQueue" channel="exampleChannel"/>
while the Java Config sample uses the
destinationName
parameter:this will literally write the JMS message in the queue named "outQueue", not in the queue defined in the outQueue bean.
Since the Java DSL/Kotlin DSL samples use the
destinationExpression
, the "discrepancy" is probably intentional to show all existing variations of how to define the destination, but I'm pointing that one just in case.