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 2010/07/09 08:58:03 UTC

Re: RecipientList (for multicast) --> senderList to read from several sources

On Fri, Jul 9, 2010 at 8:54 AM, Charles Moulliard <cm...@gmail.com> wrote:
>
> Hi,
>
> It could be interesting to have in Camel a senderList by opposition to the
> recipientList (multicast) already available.
>
> This will allow to design routes like that
>
> senderlist(
> from(uri="amq1:queue:toto")
> from(uri="amq2:queue:toto")
> from(uri="amq3:queue:toto")
> )
> .to()
>
> Remark : To allow to consume messages from different activemq brokers, we
> should create different camel routes. Using a senderList will allow us to
> collect all the messages comming from different sources (in this case,
> active MQ brokers)
>
> What do you think about that ?
>

A route can have multiple inputs

from("amq1", "amq2", "amq3").to("bla")...



> Cheers,
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045326.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: RecipientList (for multicast) --> senderList to read from several sources

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jul 9, 2010 at 11:39 AM, Willem Jiang <wi...@gmail.com> wrote:
> Can we change the from endpoints dynamically?
>

No of course not the endpoints is resolved when the route model is
being build at startup.

But you can at runtime stop the route consumer. Adjust the endpoint.
And start the consumer again.
Some consumers support this like the JMS.

Otherwise you can stop and remote the route and add another where you
have changed the endpoint as you like.



> Willem
>
> Claus Ibsen wrote:
>>
>> Hi
>>
>> <route>
>>  <from A>
>>  <from B>
>>  <from C>
>>  <to bla>
>> </route>
>>
>>
>> On Fri, Jul 9, 2010 at 9:19 AM, Charles Moulliard <cm...@gmail.com>
>> wrote:
>>>
>>> Can we do that in spring DSL using by example a list of endpoints ?
>>>
>>> e.g.
>>>
>>> <endpoint id="activemq1" uri="activemq1:queue:toto"/>
>>> <endpoint id="activemq2" uri="activemq2:queue:toto"/>
>>> <endpoint id="activemq3" uri="activemq3:queue:toto"/>
>>>
>>> <from ref="activemq1,activemq2,activemq3"/>
>>>
>>> OR
>>>
>>> a <endpoints> should be created ?
>>>
>>> <endpoints id="activemqList>
>>> <endpoint id="activemq1" uri="activemq1:queue:toto"/>
>>> <endpoint id="activemq2" uri="activemq2:queue:toto"/>
>>> <endpoint id="activemq3" uri="activemq3:queue:toto"/>
>>> </endpoint>
>>>
>>> <from ref="activemqList"/>
>>>
>>> Cheers,
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045333.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: RecipientList (for multicast) --> senderList to read from several sources

Posted by Willem Jiang <wi...@gmail.com>.
Can we change the from endpoints dynamically?

Willem

Claus Ibsen wrote:
> Hi
> 
> <route>
>   <from A>
>   <from B>
>   <from C>
>   <to bla>
> </route>
> 
> 
> On Fri, Jul 9, 2010 at 9:19 AM, Charles Moulliard <cm...@gmail.com> wrote:
>> Can we do that in spring DSL using by example a list of endpoints ?
>>
>> e.g.
>>
>> <endpoint id="activemq1" uri="activemq1:queue:toto"/>
>> <endpoint id="activemq2" uri="activemq2:queue:toto"/>
>> <endpoint id="activemq3" uri="activemq3:queue:toto"/>
>>
>> <from ref="activemq1,activemq2,activemq3"/>
>>
>> OR
>>
>> a <endpoints> should be created ?
>>
>> <endpoints id="activemqList>
>> <endpoint id="activemq1" uri="activemq1:queue:toto"/>
>> <endpoint id="activemq2" uri="activemq2:queue:toto"/>
>> <endpoint id="activemq3" uri="activemq3:queue:toto"/>
>> </endpoint>
>>
>> <from ref="activemqList"/>
>>
>> Cheers,
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045333.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
> 
> 
> 


Re: RecipientList (for multicast) --> senderList to read from several sources

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

<route>
  <from A>
  <from B>
  <from C>
  <to bla>
</route>


On Fri, Jul 9, 2010 at 9:19 AM, Charles Moulliard <cm...@gmail.com> wrote:
>
> Can we do that in spring DSL using by example a list of endpoints ?
>
> e.g.
>
> <endpoint id="activemq1" uri="activemq1:queue:toto"/>
> <endpoint id="activemq2" uri="activemq2:queue:toto"/>
> <endpoint id="activemq3" uri="activemq3:queue:toto"/>
>
> <from ref="activemq1,activemq2,activemq3"/>
>
> OR
>
> a <endpoints> should be created ?
>
> <endpoints id="activemqList>
> <endpoint id="activemq1" uri="activemq1:queue:toto"/>
> <endpoint id="activemq2" uri="activemq2:queue:toto"/>
> <endpoint id="activemq3" uri="activemq3:queue:toto"/>
> </endpoint>
>
> <from ref="activemqList"/>
>
> Cheers,
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045333.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: RecipientList (for multicast) --> senderList to read from several sources

Posted by Charles Moulliard <cm...@gmail.com>.
Can we do that in spring DSL using by example a list of endpoints ?

e.g.

<endpoint id="activemq1" uri="activemq1:queue:toto"/>
<endpoint id="activemq2" uri="activemq2:queue:toto"/>
<endpoint id="activemq3" uri="activemq3:queue:toto"/>

<from ref="activemq1,activemq2,activemq3"/>

OR 

a <endpoints> should be created ?

<endpoints id="activemqList>
<endpoint id="activemq1" uri="activemq1:queue:toto"/>
<endpoint id="activemq2" uri="activemq2:queue:toto"/>
<endpoint id="activemq3" uri="activemq3:queue:toto"/>
</endpoint>

<from ref="activemqList"/>

Cheers,

-- 
View this message in context: http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045333.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RecipientList (for multicast) --> senderList to read from several sources

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jul 9, 2010 at 9:02 AM, Charles Moulliard <cm...@gmail.com> wrote:
>
> Can we create dynamically the content of this uri list separated for the
> from() ?

Its just java code so you can do what the heck you want

String[] dynamcUris = ...

from(dynamicUris).to("bla");


> --
> View this message in context: http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045330.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: RecipientList (for multicast) --> senderList to read from several sources

Posted by Charles Moulliard <cm...@gmail.com>.
Can we create dynamically the content of this uri list separated for the
from() ?
-- 
View this message in context: http://camel.465427.n5.nabble.com/RecipientList-for-multicast-senderList-to-read-from-several-sources-tp1045326p1045330.html
Sent from the Camel - Users mailing list archive at Nabble.com.