Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In some situations, our deployment may consist of different systems that are using different data formats in their messages for communication. Each application would have its own data format and therefore we would need to translate messages into formats that are supported.

In this scenario, we would use a message translator as a filter for the translation process and we could incorporate multiple translation processes chained together.

Camel has the ability to support the message translator pattern using the processor, bean, or transform possibilities.

XML DSL Processor Example

<route>
        <from uri="direct:convertOrder"/>
        <process ref="converter"/>
</route>

<bean id="converter" class="com.mycompany.
OrderConvertProcessor"/>

Using the following Bean definition:

<route>
<from uri="direct:convertOrder"/>
<bean ref="converter"/>
</route>
<bean id="converter"
class="com.mycompany.OrderConvertBean"/>

XML DSP Transform Example

<route>
<from uri="mina:tcp://localhost:8888?textline=true"/>
<to uri="jms:queue:order:in"/>
<transform>
<constant>Acknowledged</constant>
</transform>
</route>
  • No labels