You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2008/11/20 10:18:44 UTC

Re: RecipientList Distribution & J

Hi

Ah you can just return the actual endpoint URI and Camel will use it as runtime

So you can return a list like this:

"jms:queue:foo"
"jms:queue:bar"
"jms:topic:goldtopic"

Just use the jms prefix to indicate the jms component should be used.
Actually it should be the JMS you have configured in Camel. What JMS
broker are you connecting to?



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



On Thu, Nov 20, 2008 at 10:14 AM, Coder One <co...@yahoo.com> wrote:
> I need the list to be dynamic though, so foo and bar could end up being foo-1,...foo-n, and same for bar...
>
> Ie..dynamic "routing" based on a message id and need the message to arrive at a given endpoint, jms in this case.
>
> There is an admin process to create the actual JMS topic/queue, but my routing piece needs to stay dynamic...
>
> Thanks!
>
> --- On Wed, 11/19/08, Claus Ibsen <cl...@gmail.com> wrote:
>
>> From: Claus Ibsen <cl...@gmail.com>
>> Subject: Re: RecipientList Distribution & JM
>> To: camel-user@activemq.apache.org, coder_lol@yahoo.com
>> Date: Wednesday, November 19, 2008, 11:44 PM
>> Hi
>>
>> I think you can use endpoint ids in the destinationIds
>> header.
>>
>> <endpoint id="foo"
>> uri="jms:queue:foo"/>
>> <endpoint id="bar"
>> uri="jms:queue:bar"/>
>>
>> And then you can have foo and bar in the header.
>>
>>
>> /Claus Ibsen
>> Apache Camel Committer
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>>
>> On Thu, Nov 20, 2008 at 7:10 AM, Coder One
>> <co...@yahoo.com> wrote:
>> > destionationIds="A" or "A,B,C"
>> >
>> >
>> from("direct:start").recipientList().header("destinationIds");
>> >
>> > How can I distribute the above to JMS queue or topic
>> A, B, C respectively?  Or similarly, would it be possible to
>> name the JMS queues/topics as abc.xyz.A abc.xyz.B, and
>> abc.xyz.C and route accordingly?
>> >
>> > Thanks...
>> >
>> >
>> >
>> >
>> >
>> >
>
>
>
>
>

Re: RecipientList Distribution & J

Posted by Coder One <co...@yahoo.com>.
Good idea...when I put the stuff into direct:start, I will create the recipient list as per your description.

I use Tibco EMS and Active MQ...

thanks again!

--- On Thu, 11/20/08, Claus Ibsen <cl...@gmail.com> wrote:

> From: Claus Ibsen <cl...@gmail.com>
> Subject: Re: RecipientList Distribution & J
> To: camel-user@activemq.apache.org, coder_lol@yahoo.com
> Date: Thursday, November 20, 2008, 1:18 AM
> Hi
> 
> Ah you can just return the actual endpoint URI and Camel
> will use it as runtime
> 
> So you can return a list like this:
> 
> "jms:queue:foo"
> "jms:queue:bar"
> "jms:topic:goldtopic"
> 
> Just use the jms prefix to indicate the jms component
> should be used.
> Actually it should be the JMS you have configured in Camel.
> What JMS
> broker are you connecting to?
> 
> 
> 
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
> 
> 
> 
> On Thu, Nov 20, 2008 at 10:14 AM, Coder One
> <co...@yahoo.com> wrote:
> > I need the list to be dynamic though, so foo and bar
> could end up being foo-1,...foo-n, and same for bar...
> >
> > Ie..dynamic "routing" based on a message id
> and need the message to arrive at a given endpoint, jms in
> this case.
> >
> > There is an admin process to create the actual JMS
> topic/queue, but my routing piece needs to stay dynamic...
> >
> > Thanks!
> >
> > --- On Wed, 11/19/08, Claus Ibsen
> <cl...@gmail.com> wrote:
> >
> >> From: Claus Ibsen <cl...@gmail.com>
> >> Subject: Re: RecipientList Distribution & JM
> >> To: camel-user@activemq.apache.org,
> coder_lol@yahoo.com
> >> Date: Wednesday, November 19, 2008, 11:44 PM
> >> Hi
> >>
> >> I think you can use endpoint ids in the
> destinationIds
> >> header.
> >>
> >> <endpoint id="foo"
> >> uri="jms:queue:foo"/>
> >> <endpoint id="bar"
> >> uri="jms:queue:bar"/>
> >>
> >> And then you can have foo and bar in the header.
> >>
> >>
> >> /Claus Ibsen
> >> Apache Camel Committer
> >> Blog: http://davsclaus.blogspot.com/
> >>
> >>
> >>
> >> On Thu, Nov 20, 2008 at 7:10 AM, Coder One
> >> <co...@yahoo.com> wrote:
> >> > destionationIds="A" or
> "A,B,C"
> >> >
> >> >
> >>
> from("direct:start").recipientList().header("destinationIds");
> >> >
> >> > How can I distribute the above to JMS queue
> or topic
> >> A, B, C respectively?  Or similarly, would it be
> possible to
> >> name the JMS queues/topics as abc.xyz.A abc.xyz.B,
> and
> >> abc.xyz.C and route accordingly?
> >> >
> >> > Thanks...
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >
> >
> >
> >
> >