Table of Contents | ||||
---|---|---|---|---|
|
Messaging systems
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
endpoint.
Wiki Markup |
---|
{snippet:id=simple|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/FilterRouteBuilderTest.scala} |
Once again, if you need to specify a more advanced route, you can use the more elaborate syntax.
Wiki Markup |
---|
{snippet:id=alternatives|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/FilterRouteBuilderTest.scala} |
Pipeline
There is a simple syntax available for specifying pipeline, by simple putting to
or →
between the different steps in the pipeline.
...
Wiki Markup |
---|
{snippet:id=block|lang=java|url=activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/PipelineRouteBuilderTest.scala} |
TODO
TODO: Create a Scala alternative and example for every EIP available on http://activemq.apache.org/camel/enterprise-integration-patterns.html
...