Normalizer
Camel supports the Normalizer from the EIP patterns by using a Message Router in front of a number of Message Translator instances.
Example
This example shows a Message Normalizer that converts two types of XML messages into a common format. Messages in this common format are then filtered.
Using the Fluent Builders
Wiki Markup |
---|
{snippet:id=example|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java} |
In this case we're using a Java bean as the normalizer. The class looks like this
Wiki Markup |
---|
{snippet:id=example|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MyNormalizer.java} |
Using the Spring XML Extensions
The same example in the Spring DSL
Wiki Markup |
---|
{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml} |
See Also
Include Page | ||||
---|---|---|---|---|
|