You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Mistroni <mm...@gmail.com> on 2012/07/14 18:38:32 UTC

problem with camel:multicast

hello all
   i might be missingn something big here with regards to camel:multicast.

I have following routes configures with camel:multicast

Multicast works for the following route, where all the  camel:to are seda

       <camel:route>
            <camel:from uri="seda:processShares" />
            <camel:multicast>
                <camel:to uri="seda:fetchShareData" />
                <camel:to uri="seda:fetchShareNews" />
                <camel:to uri="seda:fetchEdgarNews" />
                <!-- Add Edgar News -->
            </camel:multicast>
        </camel:route>


but it does not work for this route, where one of the camel:to  URI is a
bean:  and others are seda:

<camel:route>
            <camel:from uri="seda:fetchShareData" />
            <camel:bean ref="serviceActivator" method="fetchData" />
            <camel:multicast>
                <camel:to
uri="bean:sharesEndpointBean?method=handleShareData" />
                <camel:to
uri="bean:camelVolatilityBean?method=loadVolatility"/>
                <camel:to uri="seda:report" />
            </camel:multicast>
        </camel:route>

the message gets delivered to the first bean:sharesEndpointBean and
seda:report but the message
never reaches bean:camelVolatilityBean.

anyone could assist?

w/kindest regards
 marco

Re: problem with camel:multicast

Posted by Marco Mistroni <mm...@gmail.com>.
Hello Christian
  thanks for the reply. will try to write a small unittest for that and get
back to you as soon as i can

w/kindest regards
 marco

On Sat, Jul 14, 2012 at 11:25 PM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Hello Marco!
>
> You should start on this page [1]. We have to know a few things more than
> you provided:
> - which Java version do you use
> - which Camel version do you use
>
> And because your route looks really similar to the one on our web site [2],
> I'm pretty sure it will work.
> Could you please provide a unit test which demonstrate this issue? This
> will help to figure out what you are doing wrong or what the bug is. And it
> will definitely help you to get your answer quicker...
>
> [1] http://camel.apache.org/how-can-i-get-help.html
> [2] http://camel.apache.org/multicast.html
>
> Best,
> Christian
>
> On Sat, Jul 14, 2012 at 6:38 PM, Marco Mistroni <mm...@gmail.com>
> wrote:
>
> > hello all
> >    i might be missingn something big here with regards to
> camel:multicast.
> >
> > I have following routes configures with camel:multicast
> >
> > Multicast works for the following route, where all the  camel:to are seda
> >
> >        <camel:route>
> >             <camel:from uri="seda:processShares" />
> >             <camel:multicast>
> >                 <camel:to uri="seda:fetchShareData" />
> >                 <camel:to uri="seda:fetchShareNews" />
> >                 <camel:to uri="seda:fetchEdgarNews" />
> >                 <!-- Add Edgar News -->
> >             </camel:multicast>
> >         </camel:route>
> >
> >
> > but it does not work for this route, where one of the camel:to  URI is a
> > bean:  and others are seda:
> >
> > <camel:route>
> >             <camel:from uri="seda:fetchShareData" />
> >             <camel:bean ref="serviceActivator" method="fetchData" />
> >             <camel:multicast>
> >                 <camel:to
> > uri="bean:sharesEndpointBean?method=handleShareData" />
> >                 <camel:to
> > uri="bean:camelVolatilityBean?method=loadVolatility"/>
> >                 <camel:to uri="seda:report" />
> >             </camel:multicast>
> >         </camel:route>
> >
> > the message gets delivered to the first bean:sharesEndpointBean and
> > seda:report but the message
> > never reaches bean:camelVolatilityBean.
> >
> > anyone could assist?
> >
> > w/kindest regards
> >  marco
> >
>

Re: problem with camel:multicast

Posted by Christian Müller <ch...@gmail.com>.
Hello Marco!

You should start on this page [1]. We have to know a few things more than
you provided:
- which Java version do you use
- which Camel version do you use

And because your route looks really similar to the one on our web site [2],
I'm pretty sure it will work.
Could you please provide a unit test which demonstrate this issue? This
will help to figure out what you are doing wrong or what the bug is. And it
will definitely help you to get your answer quicker...

[1] http://camel.apache.org/how-can-i-get-help.html
[2] http://camel.apache.org/multicast.html

Best,
Christian

On Sat, Jul 14, 2012 at 6:38 PM, Marco Mistroni <mm...@gmail.com> wrote:

> hello all
>    i might be missingn something big here with regards to camel:multicast.
>
> I have following routes configures with camel:multicast
>
> Multicast works for the following route, where all the  camel:to are seda
>
>        <camel:route>
>             <camel:from uri="seda:processShares" />
>             <camel:multicast>
>                 <camel:to uri="seda:fetchShareData" />
>                 <camel:to uri="seda:fetchShareNews" />
>                 <camel:to uri="seda:fetchEdgarNews" />
>                 <!-- Add Edgar News -->
>             </camel:multicast>
>         </camel:route>
>
>
> but it does not work for this route, where one of the camel:to  URI is a
> bean:  and others are seda:
>
> <camel:route>
>             <camel:from uri="seda:fetchShareData" />
>             <camel:bean ref="serviceActivator" method="fetchData" />
>             <camel:multicast>
>                 <camel:to
> uri="bean:sharesEndpointBean?method=handleShareData" />
>                 <camel:to
> uri="bean:camelVolatilityBean?method=loadVolatility"/>
>                 <camel:to uri="seda:report" />
>             </camel:multicast>
>         </camel:route>
>
> the message gets delivered to the first bean:sharesEndpointBean and
> seda:report but the message
> never reaches bean:camelVolatilityBean.
>
> anyone could assist?
>
> w/kindest regards
>  marco
>

Re: problem with camel:multicast

Posted by Marco Mistroni <mm...@gmail.com>.
Hello all
 sorry , it was an 'operator error'.... :(

the signature of the camelVolatilityBean.loadVolatility was incorrect, and
that's why the message didnt get delivered.....

I though it was expecting a messate of type  objectX but it was instead
getting objectY

i really apologize for the noise

w/kindest regards
 marco



On Sun, Jul 15, 2012 at 8:11 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> This seems a bit odd.
> Have you tried with only 1 of the beans, to see that the volatiliy
> bean is invoked and you can see if it works?
>
> From the multicast EIP point of view, its just all 3 processors in its
> output to process a copy of the same message.
> So it shouldn't matter if its a bean, seda, direct, jms, or whatever
> endpoint.
>
>
>
> On Sat, Jul 14, 2012 at 6:38 PM, Marco Mistroni <mm...@gmail.com>
> wrote:
> > hello all
> >    i might be missingn something big here with regards to
> camel:multicast.
> >
> > I have following routes configures with camel:multicast
> >
> > Multicast works for the following route, where all the  camel:to are seda
> >
> >        <camel:route>
> >             <camel:from uri="seda:processShares" />
> >             <camel:multicast>
> >                 <camel:to uri="seda:fetchShareData" />
> >                 <camel:to uri="seda:fetchShareNews" />
> >                 <camel:to uri="seda:fetchEdgarNews" />
> >                 <!-- Add Edgar News -->
> >             </camel:multicast>
> >         </camel:route>
> >
> >
> > but it does not work for this route, where one of the camel:to  URI is a
> > bean:  and others are seda:
> >
> > <camel:route>
> >             <camel:from uri="seda:fetchShareData" />
> >             <camel:bean ref="serviceActivator" method="fetchData" />
> >             <camel:multicast>
> >                 <camel:to
> > uri="bean:sharesEndpointBean?method=handleShareData" />
> >                 <camel:to
> > uri="bean:camelVolatilityBean?method=loadVolatility"/>
> >                 <camel:to uri="seda:report" />
> >             </camel:multicast>
> >         </camel:route>
> >
> > the message gets delivered to the first bean:sharesEndpointBean and
> > seda:report but the message
> > never reaches bean:camelVolatilityBean.
> >
> > anyone could assist?
> >
> > w/kindest regards
> >  marco
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: problem with camel:multicast

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

This seems a bit odd.
Have you tried with only 1 of the beans, to see that the volatiliy
bean is invoked and you can see if it works?

>From the multicast EIP point of view, its just all 3 processors in its
output to process a copy of the same message.
So it shouldn't matter if its a bean, seda, direct, jms, or whatever endpoint.



On Sat, Jul 14, 2012 at 6:38 PM, Marco Mistroni <mm...@gmail.com> wrote:
> hello all
>    i might be missingn something big here with regards to camel:multicast.
>
> I have following routes configures with camel:multicast
>
> Multicast works for the following route, where all the  camel:to are seda
>
>        <camel:route>
>             <camel:from uri="seda:processShares" />
>             <camel:multicast>
>                 <camel:to uri="seda:fetchShareData" />
>                 <camel:to uri="seda:fetchShareNews" />
>                 <camel:to uri="seda:fetchEdgarNews" />
>                 <!-- Add Edgar News -->
>             </camel:multicast>
>         </camel:route>
>
>
> but it does not work for this route, where one of the camel:to  URI is a
> bean:  and others are seda:
>
> <camel:route>
>             <camel:from uri="seda:fetchShareData" />
>             <camel:bean ref="serviceActivator" method="fetchData" />
>             <camel:multicast>
>                 <camel:to
> uri="bean:sharesEndpointBean?method=handleShareData" />
>                 <camel:to
> uri="bean:camelVolatilityBean?method=loadVolatility"/>
>                 <camel:to uri="seda:report" />
>             </camel:multicast>
>         </camel:route>
>
> the message gets delivered to the first bean:sharesEndpointBean and
> seda:report but the message
> never reaches bean:camelVolatilityBean.
>
> anyone could assist?
>
> w/kindest regards
>  marco



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