Repository: camel
Updated Branches:
  refs/heads/master 822c25b1d -> a2b3823fe


Added Pipes and filters 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/a2b3823f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a2b3823f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a2b3823f

Branch: refs/heads/master
Commit: a2b3823fe0745b9ad0d2edfadcb9a1a6aecac639
Parents: 822c25b
Author: Andrea Cosentino <anco...@gmail.com>
Authored: Mon Oct 24 16:50:31 2016 +0200
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Mon Oct 24 16:50:31 2016 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/pipes-and-filters.adoc | 93 ++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                  |  1 +
 2 files changed, 94 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a2b3823f/camel-core/src/main/docs/pipes-and-filters.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/pipes-and-filters.adoc 
b/camel-core/src/main/docs/pipes-and-filters.adoc
new file mode 100644
index 0000000..3a820a6
--- /dev/null
+++ b/camel-core/src/main/docs/pipes-and-filters.adoc
@@ -0,0 +1,93 @@
+[[PipesandFilters-PipesandFilters]]
+Pipes and Filters
+^^^^^^^^^^^^^^^^^
+
+Camel supports the
+http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html[Pipes
+and Filters] from the link:enterprise-integration-patterns.html[EIP
+patterns] in various ways.
+
+image:http://www.enterpriseintegrationpatterns.com/img/PipesAndFilters.gif[image]
+
+With Camel you can split your processing across multiple independent
+link:endpoint.html[Endpoint] instances which can then be chained
+together.
+
+[[PipesandFilters-UsingRoutingLogic]]
+Using Routing Logic
++++++++++++++++++++
+
+You can create pipelines of logic using multiple
+link:endpoint.html[Endpoint] or link:message-translator.html[Message
+Translator] instances as follows
+
+Though pipeline is the default mode of operation when you specify
+multiple outputs in Camel. The opposite to pipeline is multicast; which
+fires the same message into each of its outputs. (See the example
+below).
+
+In Spring XML you can use the <pipeline/> element
+
+[source,java]
+------------------------------------
+<route>
+  <from uri="activemq:SomeQueue"/>
+  <pipeline>
+    <bean ref="foo"/>
+    <bean ref="bar"/>
+    <to uri="activemq:OutputQueue"/>
+  </pipeline>
+</route>
+------------------------------------
+
+In the above the pipeline element is actually unnecessary, you could use
+this...
+
+[source,java]
+----------------------------------
+<route>
+  <from uri="activemq:SomeQueue"/>
+  <bean ref="foo"/>
+  <bean ref="bar"/>
+  <to uri="activemq:OutputQueue"/>
+</route>
+----------------------------------
+
+Its just a bit more explicit. However if you wish to use <multicast/> to
+avoid a pipeline - to send the same message into multiple pipelines -
+then the <pipeline/> element comes into its own.
+
+[source,java]
+--------------------------------------
+<route>
+  <from uri="activemq:SomeQueue"/>
+  <multicast>
+    <pipeline>
+      <bean ref="something"/>
+      <to uri="log:Something"/>
+    </pipeline>
+    <pipeline>
+      <bean ref="foo"/>
+      <bean ref="bar"/>
+      <to uri="activemq:OutputQueue"/>
+    </pipeline>
+  </multicast>
+</route>
+--------------------------------------
+
+In the above example we are routing from a single
+link:endpoint.html[Endpoint] to a list of different endpoints specified
+using link:uris.html[URIs]. If you find the above a bit confusing, try
+reading about the link:architecture.html[Architecture] or try the
+link:examples.html[Examples]
+
+[[PipesandFilters-UsingThisPattern]]
+Using This Pattern
+++++++++++++++++++
+
+If you would like to use this EIP Pattern then please read the
+link:getting-started.html[Getting Started], you may also find the
+link:architecture.html[Architecture] useful particularly the description
+of link:endpoint.html[Endpoint] and link:uris.html[URIs]. Then you could
+try out some of the link:examples.html[Examples] first before trying
+this pattern out.

http://git-wip-us.apache.org/repos/asf/camel/blob/a2b3823f/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index dfc44b5..de1dc18 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -78,6 +78,7 @@
     * [Event Message](event-message.adoc)
     * [Message](message.adoc)
     * [Message Channel](message-channel.adoc)
+    * [Pipes and Filter](pipes-and-filters.adoc)
     * [Request Reply](request-reply.adoc)
     * [Return Address](return-address.adoc)
 

Reply via email to