Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Content FilterCamel supports the Content Filter from the EIP patterns using one of the following mechanisms in the routing logic to transform content from the inbound message.
A common way to filter messages is to use an Expression in the DSL like XQuery, SQL or one of the supported Scripting Languages. Using the Fluent Builders Here is a simple example using the DSL directly Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
In this example we add our own Processor Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
For further examples of this pattern in use you could look at one of the JUnit tests Using Spring XML <route> <from uri="activemq:Input"/> <bean ref="myBeanName" method="doTransform"/> <to uri="activemq:Output"/> </route> You can also use XPath to filter out part of the message you are interested in: <route> <from uri="activemq:Input"/> <setBody><xpath resultType="org.w3c.dom.Document">//foo:bar</xpath></setBody> <to uri="activemq:Output"/> </route> Using This PatternIf you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out. |