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/12/05 10:31:35 UTC

Re: Question on VM Endpoint, multipleConsumers and OSGi

Hi

Have you used DEBUG logging at the seda component to see what happens?
It logs when it send to a consumer.



On Mon, Nov 29, 2010 at 3:13 PM, klausb <kl...@hp.com> wrote:
>
> I'm using camel 2.5.0 and try to setup a simple pub-sub behavior among three
> OSGi bundles.
> One bundle (writer) is sending messages via
>    to("vm:discovery?multipleConsumers=true")
>
> The two other bundles (listener) receive messages via
>    from("vm:discovery?multipleConsumers=true")
>
> All bundles are loaded into Apache Karaf.
>
> If I start all three listener bundles and finally start the writer only
> one(!) listener reports that the packet was received. I expected log
> messages from both listeners due to multipleConsumers=true.
>
> Did I misunderstood the vm option?
>
> klaus.
> --
> View this message in context: http://camel.465427.n5.nabble.com/Question-on-VM-Endpoint-multipleConsumers-and-OSGi-tp3284450p3284450.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
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 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/

Re: Question on VM Endpoint, multipleConsumers and OSGi

Posted by vivekvasudeva <tu...@yahoo.com>.
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.