camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [2/3] camel git commit: Added Correlation Identifier EIP docs to gitbook
Date Mon, 26 Sep 2016 09:11:25 GMT
Added Correlation Identifier EIP docs to gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/656b8a7e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/656b8a7e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/656b8a7e

Branch: refs/heads/master
Commit: 656b8a7e51f434e784faac209c028742cdb0c5d9
Parents: 28a93d5
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Sep 26 11:07:37 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Sep 26 11:07:37 2016 +0200

----------------------------------------------------------------------
 .../src/main/docs/correlation-identifier.adoc   | 64 ++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                  |  1 +
 2 files changed, 65 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/656b8a7e/camel-core/src/main/docs/correlation-identifier.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/correlation-identifier.adoc b/camel-core/src/main/docs/correlation-identifier.adoc
new file mode 100644
index 0000000..d020eb8
--- /dev/null
+++ b/camel-core/src/main/docs/correlation-identifier.adoc
@@ -0,0 +1,64 @@
+[[CorrelationIdentifier-CorrelationIdentifier]]
+Correlation Identifier
+^^^^^^^^^^^^^^^^^^^^^^
+
+Camel supports the
+http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html[Correlation
+Identifier] from the link:enterprise-integration-patterns.html[EIP
+patterns] by getting or setting a header on a
+link:message.html[Message].
+
+When working with the link:activemq.html[ActiveMQ] or link:jms.html[JMS]
+components the correlation identifier header is called
+*JMSCorrelationID*. You can add your own correlation identifier to any
+message exchange to help correlate messages together to a single
+conversation (or business process).
+
+image:http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif[image]
+
+The use of a Correlation Identifier is key to working with the
+link:bam.html[Camel Business Activity Monitoring Framework] and can also
+be highly useful when testing with simulation or canned data such as
+with the link:mock.html[Mock testing framework]
+
+Some link:eip.html[EIP] patterns will spin off a sub message, and in
+those cases, Camel will add a correlation id on the
+link:exchange.html[Exchange] as a property with they key
+`Exchange.CORRELATION_ID`, which links back to the source
+link:exchange.html[Exchange]. For example the
+link:splitter.html[Splitter], link:multicast.html[Multicast],
+link:recipient-list.html[Recipient List], and link:wire-tap.html[Wire
+Tap] EIP does this.
+
+The following example demonstrates using the Camel JMSMessageID as the
+Correlation Identifier within a request/reply pattern in
+the link:jms.html[JMS] component
+
+*Using the link:fluent-builders.html[Fluent Builders]*
+
+[source,java]
+-------------------------------------------------------------------------------
+from("direct:start")
+    .to(ExchangePattern.InOut,"jms:queue:foo?useMessageIDAsCorrelationID=true")
+    .to("mock:result");
+-------------------------------------------------------------------------------
+
+ 
+
+**Using the link:spring-xml-extensions.html[Spring XML Extensions]**
+
+[source,xml]
+------------------------------------------------------------------------------
+<route>
+    <from uri="direct:start"/>
+    <to uri="jms:queue:foo?useMessageIDAsCorrelationID=true" pattern="InOut"/>
+    <to uri="mock:result"/>
+</route>
+------------------------------------------------------------------------------
+
+[[CorrelationIdentifier-SeeAlso]]
+See Also
+++++++++
+
+* link:bam.html[BAM]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/656b8a7e/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 9313b16..c70d902 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -73,6 +73,7 @@
 -->
 
 * [Enterprise Integration Patterns](enterprise-integration-patterns.adoc)
+    * [Correlation Identifier](correlation-identifier.adoc)
     * [Event Message](event-message.adoc)
     * [Message](message.adoc)
     * [Request Reply](request-reply.adoc)


Mime
View raw message