You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vivekvasudeva <tu...@yahoo.com> on 2012/02/04 23:14:06 UTC

Re: Question on VM Endpoint, multipleConsumers and OSGi

Hey, 
I have a very similar issue ...of multipleConsumers not working as expected
//Master class
from(jmx:.....xyz)
.log("master" + $body)
.to(seda:myq?multipleConsumers=true)

// Consumer class
from("seda:myq).routeId(consumerId)
.log(consumerId + $body)

only the 1st consumer gets the message and logs it 
The 2nd, 3rd consumers does not print the message ??

So how is it true pub-sub ?

Vivek 

--
View this message in context: http://camel.465427.n5.nabble.com/Question-on-VM-Endpoint-multipleConsumers-and-OSGi-tp3284450p5457045.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question on VM Endpoint, multipleConsumers and OSGi

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

I add a little note to the option in the table of the docs.

On Wed, Feb 8, 2012 at 5:39 AM, vivekvasudeva <tu...@yahoo.com> wrote:
> I switched it to having multipleConsumers=true for all. Worked like a charm
> ...Is it possible to put it in the component doc of seda that to accomplish
> the pubsub, the multipleConsumers is needed on all places. Is there anything
> I can do to help put the same? Also to test the above I used the below
>                from("timer://foo?fixedRate=true&delay=10&period=1s")
>                .setBody(constant("Hello world!"))
>                .to("seda:dump");
>
>                from("seda:dump?multipleConsumers=true").routeId("one")
>                .log("one: + ${body}");
>
>                from("seda:dump?multipleConsumers=true").routeId("two")
>                .log("two: + ${body}");
>
>                from("seda:dump?multipleConsumers=true").routeId("three")
>                .log("three: + ${body}");
>
>        context.start();
>        Thread.sleep(10000);
>        context.stopRoute("two");
>        context.removeRoute("two");
>        Thread.sleep(10000);
>        context.stop();
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Question-on-VM-Endpoint-multipleConsumers-and-OSGi-tp3284450p5465523.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: Question on VM Endpoint, multipleConsumers and OSGi

Posted by vivekvasudeva <tu...@yahoo.com>.
I switched it to having multipleConsumers=true for all. Worked like a charm
...Is it possible to put it in the component doc of seda that to accomplish
the pubsub, the multipleConsumers is needed on all places. Is there anything
I can do to help put the same? Also to test the above I used the below
                from("timer://foo?fixedRate=true&delay=10&period=1s")
                .setBody(constant("Hello world!"))
                .to("seda:dump");        
                
                from("seda:dump?multipleConsumers=true").routeId("one")
                .log("one: + ${body}");     
                
                from("seda:dump?multipleConsumers=true").routeId("two")
                .log("two: + ${body}");                
                
                from("seda:dump?multipleConsumers=true").routeId("three")
                .log("three: + ${body}");                
                
        context.start();
        Thread.sleep(10000);
        context.stopRoute("two");
        context.removeRoute("two");
        Thread.sleep(10000);
        context.stop();

--
View this message in context: http://camel.465427.n5.nabble.com/Question-on-VM-Endpoint-multipleConsumers-and-OSGi-tp3284450p5465523.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question on VM Endpoint, multipleConsumers and OSGi

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

And you have multipleConsumers=true on all your seda endpoints?


On Sat, Feb 4, 2012 at 11:14 PM, vivekvasudeva <tu...@yahoo.com> wrote:
> Hey,
> I have a very similar issue ...of multipleConsumers not working as expected
> //Master class
> from(jmx:.....xyz)
> .log("master" + $body)
> .to(seda:myq?multipleConsumers=true)
>
> // Consumer class
> from("seda:myq).routeId(consumerId)
> .log(consumerId + $body)
>
> only the 1st consumer gets the message and logs it
> The 2nd, 3rd consumers does not print the message ??
>
> So how is it true pub-sub ?
>
> Vivek
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Question-on-VM-Endpoint-multipleConsumers-and-OSGi-tp3284450p5457045.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/