Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Some EIP patterns will spin off a sub message, and in those cases, Camel will add a correlation id on the Exchange as a property with they key Exchange.CORRELATION_ID, which links back to the source Exchange. For example the Splitter, Multicast, Recipient List, and Wire Tap EIP does this.

The following example demonstrates using the Camel JMSMessageID as the Correlation Identifier within a request/reply pattern in the JMS component

Using the Fluent Builders

Code Block
languagejava
from("direct:start")
	.to(ExchangePattern.InOut,"jms:queue:foo?useMessageIDAsCorrelationID=true")
	.to("mock:result");

 

Using the Spring XML Extensions

Code Block
languagexml
<route>
	<from uri="direct:start"/>
	<to uri="jms:queue:foo?useMessageIDAsCorrelationID=true" pattern="InOut"/>
	<to uri="mock:result"/>
</route>

See Also