camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Question about setting up routing
Date Tue, 13 Jan 2009 12:33:53 GMT
On Tue, Jan 13, 2009 at 1:18 PM, Woody Dickson <woodydickson@gmail.com> wrote:
> Hi,
>
> I would like to accomplish a scenario:
>
> Activemq receives XML from its stomp interface.  This XML will be
> processed by POJO to an Event object, then activemq will go to
> database to fetch the list of topic name and send the xml to each of
> the topics.
>
>
> <route>
>
>   <from uri="activemq:topic:AgentLogin"/>
>
>    <to uri="ibatis:selectTopicName"/>
>
>    <to uri="activemq:topic:#TopicName"/>
>
>
>
> </route>
>
> The part I don't understand is how to have camel to go through each of
> the result in the selectTopicName resultset and send message to the
> topic.
>
> Could someone please give me some hint or help how that can be done?
You are sending to a dynamic list of recipients so its this pattern
you are looking for:
http://activemq.apache.org/camel/recipient-list.html

Just provide a header with a List<String> with the endpoints to send
to and use the recipeint list

>
> Thanks alot in advance for all your help.
>
> Woody
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message