This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new aa0f12d CAMEL-16861: Cleanup and update EIP docs aa0f12d is described below commit aa0f12df74034080a05f068c57bacb529e3a9095 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Oct 19 13:49:56 2021 +0200 CAMEL-16861: Cleanup and update EIP docs --- .../src/main/docs/modules/eips/pages/step-eip.adoc | 39 ++++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/step-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/step-eip.adoc index 07a252a..78fba52 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/step-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/step-eip.adoc @@ -5,19 +5,20 @@ :since: :supportlevel: Stable -Camel supports the http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html[Pipes and Filters] from the xref:enterprise-integration-patterns.adoc[EIP patterns] in various ways. +Camel supports the http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html[Pipes and Filters] +from the xref:enterprise-integration-patterns.adoc[EIP patterns] in various ways. image::eip/PipesAndFilters.gif[image] -With Camel you can split your processing across multiple independent processing - which can then be chained together in a logical unit as a step. +With Camel, you can group your processing across multiple independent EIPs +which can then be chained together in a logical unit, called a _step_. A step groups together the child processors into a single composite unit. This allows to capture metrics at a group level which can make management and monitoring of Camel routes easier by using higher-level abstractions. You can also -think this as a middle-level between route vs each individual processors in the routes. +think this as a middle-level between the route and each individual processors in the routes. -You may want to do this when you have large routes and want to breakup the routes into +You may want to do this when you have large routes and want to break up the routes into logical steps. This means you can monitor your Camel applications and gather statistics at 4-tiers: @@ -27,26 +28,16 @@ This means you can monitor your Camel applications and gather statistics at 4-ti ** step(s) level *** processor(s) level - -== JMX Management - -Each Step EIP is registered in JMX under the `type=steps` tree, which allows to monitor -all the steps in the CamelContext. Its also possible to dump statistics in XML format -by the `dumpStepStatsAsXml` operations on the CamelContext or Route mbeans. - - == Options // eip options: START include::partial$eip-options.adoc[] // eip options: END -[[step-Examples]] -== Examples - +== Using Step EIP +In Java, you use `step` to group together sub nodes as shown: -In Java you do: [source,java] ---- from("activemq:SomeQueue") @@ -54,9 +45,13 @@ from("activemq:SomeQueue") .bean("foo") .to("acitvemq:OutputQueue") .end() + .to("direct:bar"); ---- -In XML you can use the `<step>` element +As you can see this groups together `.bean("foo")` and `.to("acitvemq:OutputQueue")` +into a logical unit with the name foo. + +In XML you use the `<step>` tag: [source,xml] ---- @@ -66,6 +61,7 @@ In XML you can use the `<step>` element <bean ref="foo"/> <to uri="activemq:OutputQueue"/> </step> + <to uri="direct:bar"/> </route> ---- @@ -100,3 +96,10 @@ And in XML </step> </route> ---- + +=== JMX Management of Step EIP + +Each Step EIP is registered in JMX under the `type=steps` tree, which allows to monitor +all the steps in the CamelContext. It is also possible to dump statistics in XML format +by the `dumpStepStatsAsXml` operations on the `CamelContext` or `Route` mbeans. +