You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Hervé BARRAULT <he...@gmail.com> on 2012/01/16 11:20:47 UTC

Multicast And Activemq

Hi,
I have a question concerning camel camel-core (2.4.0.fuse-00-00) ,
activemq camel activemq-camel (5.4.0.fuse-00-00) and activemq
activemq-core (5.4.0.fuse-00-00).

I am trying to use multicast.

I had a route :

from(sourceUri_)
            .errorHandler(noErrorHandler())
            .policy(getTracePolicy())
            .policy(getErrorReportingPolicy())
            .process(myProcessor_)
            .recipientList(header(TARGET_HEADER));

But when sending to n target queues, we noticed that the behavior is
sequential (normal).

Now we are trying to use multicast :
from(sourceUri_)
            .errorHandler(noErrorHandler())
            .policy(getTracePolicy())
            .policy(getErrorReportingPolicy())
            .process(myProcessor_)
            .multicast()
            .parallelProcessing()
            .recipientList(header(TARGET_HEADER));


In this case the message is correctly send to the expected queues (in
my test 2) but only one queue is consumed.
For information the processor send itself a generated message in
another queue, and we are using one way.

Is the right method to use multicast ? Is there something else to do ?

Thanks for answers.

Regards
Hervé

Re: Multicast And Activemq

Posted by Hervé BARRAULT <he...@gmail.com>.
Hi,
I have tested like described in
http://camel.apache.org/recipient-list.html#RecipientList-Sendingtomultiplerecipientsinparallel
and it is working.

I had a strange behavior because i had an error in the consumer configuration.

Thank you for the help.


On 1/16/12, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> You should not do both multicast + recipient list.
> The recipient list also has the parallel processing. So just use that EIP
> only.
>
>
> On Mon, Jan 16, 2012 at 11:32 AM, Hervé BARRAULT
> <he...@gmail.com> wrote:
>> Hi,
>> I used parallel processing like shown in
>> http://camel.apache.org/multicast.html without timeout.
>>
>> [quote]
>> .process(myProcessor_)
>> .multicast()
>> .parallelProcessing()
>> .recipientList(header(TARGET_HEADER));
>> [/quote]
>>
>> Regards
>>
>> On 1/16/12, Claus Ibsen <cl...@gmail.com> wrote:
>>> Hi
>>>
>>> You need to use the parallelProcessing option as documented on the
>>> wiki pages for those EIPs.
>>>
>>>
>>> On Mon, Jan 16, 2012 at 11:20 AM, Hervé BARRAULT
>>> <he...@gmail.com> wrote:
>>>> Hi,
>>>> I have a question concerning camel camel-core (2.4.0.fuse-00-00) ,
>>>> activemq camel activemq-camel (5.4.0.fuse-00-00) and activemq
>>>> activemq-core (5.4.0.fuse-00-00).
>>>>
>>>> I am trying to use multicast.
>>>>
>>>> I had a route :
>>>>
>>>> from(sourceUri_)
>>>>            .errorHandler(noErrorHandler())
>>>>            .policy(getTracePolicy())
>>>>            .policy(getErrorReportingPolicy())
>>>>            .process(myProcessor_)
>>>>            .recipientList(header(TARGET_HEADER));
>>>>
>>>> But when sending to n target queues, we noticed that the behavior is
>>>> sequential (normal).
>>>>
>>>> Now we are trying to use multicast :
>>>> from(sourceUri_)
>>>>            .errorHandler(noErrorHandler())
>>>>            .policy(getTracePolicy())
>>>>            .policy(getErrorReportingPolicy())
>>>>            .process(myProcessor_)
>>>>            .multicast()
>>>>            .parallelProcessing()
>>>>            .recipientList(header(TARGET_HEADER));
>>>>
>>>>
>>>> In this case the message is correctly send to the expected queues (in
>>>> my test 2) but only one queue is consumed.
>>>> For information the processor send itself a generated message in
>>>> another queue, and we are using one way.
>>>>
>>>> Is the right method to use multicast ? Is there something else to do ?
>>>>
>>>> Thanks for answers.
>>>>
>>>> Regards
>>>> Hervé
>>>
>>>
>>>
>>> --
>>> 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/
>>>
>
>
>
> --
> 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: Multicast And Activemq

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

You should not do both multicast + recipient list.
The recipient list also has the parallel processing. So just use that EIP only.


On Mon, Jan 16, 2012 at 11:32 AM, Hervé BARRAULT
<he...@gmail.com> wrote:
> Hi,
> I used parallel processing like shown in
> http://camel.apache.org/multicast.html without timeout.
>
> [quote]
> .process(myProcessor_)
> .multicast()
> .parallelProcessing()
> .recipientList(header(TARGET_HEADER));
> [/quote]
>
> Regards
>
> On 1/16/12, Claus Ibsen <cl...@gmail.com> wrote:
>> Hi
>>
>> You need to use the parallelProcessing option as documented on the
>> wiki pages for those EIPs.
>>
>>
>> On Mon, Jan 16, 2012 at 11:20 AM, Hervé BARRAULT
>> <he...@gmail.com> wrote:
>>> Hi,
>>> I have a question concerning camel camel-core (2.4.0.fuse-00-00) ,
>>> activemq camel activemq-camel (5.4.0.fuse-00-00) and activemq
>>> activemq-core (5.4.0.fuse-00-00).
>>>
>>> I am trying to use multicast.
>>>
>>> I had a route :
>>>
>>> from(sourceUri_)
>>>            .errorHandler(noErrorHandler())
>>>            .policy(getTracePolicy())
>>>            .policy(getErrorReportingPolicy())
>>>            .process(myProcessor_)
>>>            .recipientList(header(TARGET_HEADER));
>>>
>>> But when sending to n target queues, we noticed that the behavior is
>>> sequential (normal).
>>>
>>> Now we are trying to use multicast :
>>> from(sourceUri_)
>>>            .errorHandler(noErrorHandler())
>>>            .policy(getTracePolicy())
>>>            .policy(getErrorReportingPolicy())
>>>            .process(myProcessor_)
>>>            .multicast()
>>>            .parallelProcessing()
>>>            .recipientList(header(TARGET_HEADER));
>>>
>>>
>>> In this case the message is correctly send to the expected queues (in
>>> my test 2) but only one queue is consumed.
>>> For information the processor send itself a generated message in
>>> another queue, and we are using one way.
>>>
>>> Is the right method to use multicast ? Is there something else to do ?
>>>
>>> Thanks for answers.
>>>
>>> Regards
>>> Hervé
>>
>>
>>
>> --
>> 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/
>>



-- 
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: Multicast And Activemq

Posted by Hervé BARRAULT <he...@gmail.com>.
Hi,
I used parallel processing like shown in
http://camel.apache.org/multicast.html without timeout.

[quote]
.process(myProcessor_)
.multicast()
.parallelProcessing()
.recipientList(header(TARGET_HEADER));
[/quote]

Regards

On 1/16/12, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> You need to use the parallelProcessing option as documented on the
> wiki pages for those EIPs.
>
>
> On Mon, Jan 16, 2012 at 11:20 AM, Hervé BARRAULT
> <he...@gmail.com> wrote:
>> Hi,
>> I have a question concerning camel camel-core (2.4.0.fuse-00-00) ,
>> activemq camel activemq-camel (5.4.0.fuse-00-00) and activemq
>> activemq-core (5.4.0.fuse-00-00).
>>
>> I am trying to use multicast.
>>
>> I had a route :
>>
>> from(sourceUri_)
>>            .errorHandler(noErrorHandler())
>>            .policy(getTracePolicy())
>>            .policy(getErrorReportingPolicy())
>>            .process(myProcessor_)
>>            .recipientList(header(TARGET_HEADER));
>>
>> But when sending to n target queues, we noticed that the behavior is
>> sequential (normal).
>>
>> Now we are trying to use multicast :
>> from(sourceUri_)
>>            .errorHandler(noErrorHandler())
>>            .policy(getTracePolicy())
>>            .policy(getErrorReportingPolicy())
>>            .process(myProcessor_)
>>            .multicast()
>>            .parallelProcessing()
>>            .recipientList(header(TARGET_HEADER));
>>
>>
>> In this case the message is correctly send to the expected queues (in
>> my test 2) but only one queue is consumed.
>> For information the processor send itself a generated message in
>> another queue, and we are using one way.
>>
>> Is the right method to use multicast ? Is there something else to do ?
>>
>> Thanks for answers.
>>
>> Regards
>> Hervé
>
>
>
> --
> 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: Multicast And Activemq

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

You need to use the parallelProcessing option as documented on the
wiki pages for those EIPs.


On Mon, Jan 16, 2012 at 11:20 AM, Hervé BARRAULT
<he...@gmail.com> wrote:
> Hi,
> I have a question concerning camel camel-core (2.4.0.fuse-00-00) ,
> activemq camel activemq-camel (5.4.0.fuse-00-00) and activemq
> activemq-core (5.4.0.fuse-00-00).
>
> I am trying to use multicast.
>
> I had a route :
>
> from(sourceUri_)
>            .errorHandler(noErrorHandler())
>            .policy(getTracePolicy())
>            .policy(getErrorReportingPolicy())
>            .process(myProcessor_)
>            .recipientList(header(TARGET_HEADER));
>
> But when sending to n target queues, we noticed that the behavior is
> sequential (normal).
>
> Now we are trying to use multicast :
> from(sourceUri_)
>            .errorHandler(noErrorHandler())
>            .policy(getTracePolicy())
>            .policy(getErrorReportingPolicy())
>            .process(myProcessor_)
>            .multicast()
>            .parallelProcessing()
>            .recipientList(header(TARGET_HEADER));
>
>
> In this case the message is correctly send to the expected queues (in
> my test 2) but only one queue is consumed.
> For information the processor send itself a generated message in
> another queue, and we are using one way.
>
> Is the right method to use multicast ? Is there something else to do ?
>
> Thanks for answers.
>
> Regards
> Hervé



-- 
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/