Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel3
outlinetrue
stylenone

Messaging systems

...

Pipeline

For a message filter, use the when() method with a parameter of type The Exchange ⇒ Boolean. In the example below, we use a Scala convenience method named in to access the 'in' message body; only messages where the 'in' message is <hello/> will arrive at the mock:a endpointThere is a simple syntax available for specifying pipeline, by simple putting to or between the different steps in the pipeline.

Wiki Markup
{snippet:id=simple|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/FilterRouteBuilderTestPipelineRouteBuilderTest.scala}

Once again, if you need to specify a For more advanced routeuse cases, you can also use the more elaborate syntaxa block-based syntax, where every step in the pipeline starts with either to or .

Wiki Markup
{snippet:id=alternativesblock|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/FilterRouteBuilderTestPipelineRouteBuilderTest.scala}

Pipeline

Filter

For a message filter, use the when() method with a parameter of type The Exchange ⇒ Boolean. In the example below, we use a Scala convenience method named in to access the 'in' message body; only messages where the 'in' message is <hello/> will arrive at the mock:a endpointThere is a simple syntax available for specifying pipeline, by simple putting to or between the different steps in the pipeline.

Wiki Markup
{snippet:id=simple|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/PipelineRouteBuilderTestFilterRouteBuilderTest.scala}

For Once again, if you need to specify a more advanced use casesroute, you can also use a block-based syntax, where every step in the pipeline starts with either to or use the more elaborate syntax.

Wiki Markup
{snippet:id=blockalternatives|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/PipelineRouteBuilderTestFilterRouteBuilderTest.scala}

TODO

TODO: Create a Scala alternative and example for every EIP available on http://activemq.apache.org/camel/enterprise-integration-patterns.html

...