You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by BAltmiks <be...@steria-mummert.de> on 2009/09/23 09:44:01 UTC
Persist information (the URIs) of the Route the message was sent to
Hello,
we would like to persist information (the URIs) of the Route the message was
sent to.
My Route Definition:
<camel:camelContext id="camel">
<camel:route>
<camel:from uri="jms:jms/MessageDispatcherQueue" />
<camel:transacted ref="PROPAGATION_REQUIRED" />
<camel:to uri="mqseries:tbextsys.mqseries.yereports"/>
<camel:to uri="mqseries:tbflow.mqseries.yereports"/>
<camel:transform>
<camel:method bean="TMDMESSAGEConverter" method="doTransform" />
</camel:transform>
<camel:to uri="jpa:entity.TMDMessage"/>
</camel:route>
</camel:camelContext>
The Message is read from a Queue (jms/MessageDispatcherQueue) and is sent to
different Queues (tbextsys.mqseries.yereports and
tbflow.mqseries.yereports). After that we persist the Message-Body. The
Message-Body contains XML-Data. We also would like to persist the
Endpoint-URIs the Message was sent to. In these case the information, that
the Message was sent to tbextsys.mqseries.yereports and
tbflow.mqseries.yereports. Is there a way to do that?
My Route-Definition in my example is static. In future we want to do it more
dynamically.
Thanks for your help!
Regards,
Bernd
--
View this message in context: http://www.nabble.com/Persist-information-%28the-URIs%29-of-the-Route-the-message-was-sent-to-tp25531018p25531018.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Persist information (the URIs) of the Route the message was
sent to
Posted by Ashwin Karpe <as...@progress.com>.
Hi,
The best way to do this at the moment is by introducing a choice processor
before directing the payload to the endpoint(s) and logging the choice when
a selection is made using a log component before it is sent to the endpoint.
Obviously, there needs to be some way for the choice processor to determine
where the payload will be directed.
Hope this helps.
Cheers,
Ashwin...
BAltmiks wrote:
>
> Hello,
>
> we would like to persist information (the URIs) of the Route the message
> was sent to.
>
> My Route Definition:
>
> <camel:camelContext id="camel">
> <camel:route>
> <camel:from uri="jms:jms/MessageDispatcherQueue" />
> <camel:transacted ref="PROPAGATION_REQUIRED" />
> <camel:to uri="mqseries:tbextsys.mqseries.yereports"/>
> <camel:to uri="mqseries:tbflow.mqseries.yereports"/>
> <camel:transform>
> <camel:method bean="TMDMESSAGEConverter" method="doTransform" />
> </camel:transform>
> <camel:to uri="jpa:entity.TMDMessage"/>
> </camel:route>
> </camel:camelContext>
>
> The Message is read from a Queue (jms/MessageDispatcherQueue) and is sent
> to different Queues (tbextsys.mqseries.yereports and
> tbflow.mqseries.yereports). After that we persist the Message-Body. The
> Message-Body contains XML-Data. We also would like to persist the
> Endpoint-URIs the Message was sent to. In these case the information, that
> the Message was sent to tbextsys.mqseries.yereports and
> tbflow.mqseries.yereports. Is there a way to do that?
>
> My Route-Definition in my example is static. In future we want to do it
> more dynamically.
>
> Thanks for your help!
>
> Regards,
> Bernd
>
>
>
-----
---
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
---
+1-972-304-9084 (Office)
+1-972-971-1700 (Mobile)
----
Blog: http://opensourceknowledge.blogspot.com/
--
View this message in context: http://www.nabble.com/Persist-information-%28the-URIs%29-of-the-Route-the-message-was-sent-to-tp25531018p25531151.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Persist information (the URIs) of the Route the message was sent
to
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
If you use the recepient list or routingslip EIP you specify the
endpoints URIs dynamically and thus have that information at hand.
http://camel.apache.org/recipient-list.html
http://camel.apache.org/routing-slip.html
And on the Exchange you can get the "starting" endpoint with
getFromEndpoint() method.
On Wed, Sep 23, 2009 at 9:44 AM, BAltmiks
<be...@steria-mummert.de> wrote:
>
> Hello,
>
> we would like to persist information (the URIs) of the Route the message was
> sent to.
>
> My Route Definition:
>
> <camel:camelContext id="camel">
> <camel:route>
> <camel:from uri="jms:jms/MessageDispatcherQueue" />
> <camel:transacted ref="PROPAGATION_REQUIRED" />
> <camel:to uri="mqseries:tbextsys.mqseries.yereports"/>
> <camel:to uri="mqseries:tbflow.mqseries.yereports"/>
> <camel:transform>
> <camel:method bean="TMDMESSAGEConverter" method="doTransform" />
> </camel:transform>
> <camel:to uri="jpa:entity.TMDMessage"/>
> </camel:route>
> </camel:camelContext>
>
> The Message is read from a Queue (jms/MessageDispatcherQueue) and is sent to
> different Queues (tbextsys.mqseries.yereports and
> tbflow.mqseries.yereports). After that we persist the Message-Body. The
> Message-Body contains XML-Data. We also would like to persist the
> Endpoint-URIs the Message was sent to. In these case the information, that
> the Message was sent to tbextsys.mqseries.yereports and
> tbflow.mqseries.yereports. Is there a way to do that?
>
> My Route-Definition in my example is static. In future we want to do it more
> dynamically.
>
> Thanks for your help!
>
> Regards,
> Bernd
>
>
> --
> View this message in context: http://www.nabble.com/Persist-information-%28the-URIs%29-of-the-Route-the-message-was-sent-to-tp25531018p25531018.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus