You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Apache <ap...@yahoo.com> on 2012/02/03 00:01:29 UTC

Synchronize within multicast

Is there way to synchronize two or more URI's inside a multicast block ? For instance how would we do the following:

<multicast ....threadpool>
<to uri="A"/>
<group>
<to uri="B"/>
<to uri="B"/>
</group>
</multicast>

Re: Synchronize within multicast

Posted by Matt Narrell <ma...@gmail.com>.
And/or a seda route with an InOnly ExchangePattern might work.

On Feb 3, 2012, at 9:17 AM, Claus Ibsen <cl...@gmail.com> wrote:

> The Wire Tap EIP pattern
>
> On Fri, Feb 3, 2012 at 5:51 PM, Apache <ap...@yahoo.com> wrote:
>> Multicast caller thread still blocks  on everything within the multicast
>> block.
>> Basically I am looking for a way to invoke uri's in a non blocking way where
>> the caller thread moves on after delivering a uri.
>>
>> I have also looked at your other posts within this forums but seems like
>> using the asynchronousDelayed option only makes the retries by a thread pool
>> thereby giving the effect of a non blocking call but the first thread is
>> always blocking. Is ther a way around it ?
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Synchronize-within-multicast-tp5452263p5454420.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/

Re: Synchronize within multicast

Posted by Claus Ibsen <cl...@gmail.com>.
The Wire Tap EIP pattern

On Fri, Feb 3, 2012 at 5:51 PM, Apache <ap...@yahoo.com> wrote:
> Multicast caller thread still blocks  on everything within the multicast
> block.
> Basically I am looking for a way to invoke uri's in a non blocking way where
> the caller thread moves on after delivering a uri.
>
> I have also looked at your other posts within this forums but seems like
> using the asynchronousDelayed option only makes the retries by a thread pool
> thereby giving the effect of a non blocking call but the first thread is
> always blocking. Is ther a way around it ?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Synchronize-within-multicast-tp5452263p5454420.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Synchronize within multicast

Posted by Apache <ap...@yahoo.com>.
Multicast caller thread still blocks  on everything within the multicast
block. 
Basically I am looking for a way to invoke uri's in a non blocking way where
the caller thread moves on after delivering a uri.

I have also looked at your other posts within this forums but seems like
using the asynchronousDelayed option only makes the retries by a thread pool
thereby giving the effect of a non blocking call but the first thread is
always blocking. Is ther a way around it ?  

--
View this message in context: http://camel.465427.n5.nabble.com/Synchronize-within-multicast-tp5452263p5454420.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Synchronize within multicast

Posted by Claus Ibsen <cl...@gmail.com>.
Read the EIP documentation for the EIPs you use.

For multicast
http://camel.apache.org/multicast.html

See the table with options. There is a parallelProcessing option. Set
that option to true.



On Fri, Feb 3, 2012 at 4:33 PM, Apache <ap...@yahoo.com> wrote:
> I tried using pipeline but it would still not make B and C execute
> synchronously ( last uri mean to be C ).
>
>
> I am trying using seda and direct so I guess a question on direct is that
> would using a thread after direct block the direct thread ? Example below:
>
> <direct ...>
> <threads executorRef .... />
> </direct>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Synchronize-within-multicast-tp5452263p5454181.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Synchronize within multicast

Posted by Apache <ap...@yahoo.com>.
I tried using pipeline but it would still not make B and C execute
synchronously ( last uri mean to be C ).


I am trying using seda and direct so I guess a question on direct is that
would using a thread after direct block the direct thread ? Example below:

<direct ...>
<threads executorRef .... />
</direct>  

--
View this message in context: http://camel.465427.n5.nabble.com/Synchronize-within-multicast-tp5452263p5454181.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Synchronize within multicast

Posted by Claus Ibsen <cl...@gmail.com>.
You can use <pipeline> instead of <group>


On Fri, Feb 3, 2012 at 12:01 AM, Apache <ap...@yahoo.com> wrote:
> Is there way to synchronize two or more URI's inside a multicast block ? For instance how would we do the following:
>
> <multicast ....threadpool>
> <to uri="A"/>
> <group>
> <to uri="B"/>
> <to uri="B"/>
> </group>
> </multicast>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/