[zeromq-dev] Pub/Sub multi sockets & PGM
Martin Sustrik
sustrik at 250bpm.com
Thu Feb 4 09:49:40 CET 2010
Hi Olivier,
We've found some more regressions while solving this issue so it took
some time to fix.
Hopefully, the current trunk version should work as expected.
Please, let us know!
Martin
> I'm using the pub/sub model with pgm. And in my subscriber, i need to
> manage the messages received in different way, depending on their
> topics.
> So, instead of using one socket with multiple filtering like :
>
> s.setsockopt (ZMQ_SUBSCRIBE, "x.",2 );
> s.setsockopt (ZMQ_SUBSCRIBE, "y.",2 );
>
> I try to open one socket per topic :
>
> zmq::context_t ctx ( number_of_topic, 1);
>
> (thread 1)
> zmq::socket_t s1 (*ctx, ZMQ_SUB)
> s1.connect ("pgm://eth0;224.0.0.1:5555");
> s1.setsockopt (ZMQ_SUBSCRIBE, "x.",2);
>
> (thread 2)
> zmq::socket_t s2 (*ctx, ZMQ_SUB)
> s2.connect ("pgm://eth0;224.0.0.1:5555");
> s2.setsockopt (ZMQ_SUBSCRIBE, "y.",2);
>
> But, by doing this, i got this error :
>
> Pgm-CRITICAL **: pgm_init: assertion `pgm_got_initialized == FALSE'
> failed
> terminate called after throwing an instance of 'zmq::error_t'
> what(): Invalid argument
> Abandon
>
>
> With one topic it works fine, but with two or more, this error appears.
> What am i doing wrong ? Any idea ?
>
>
>
> Regards,
> Olivier.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list