[zeromq-dev] Subscription lost after publisher restart

Diego Fons diego.fons at intraway.com
Tue Mar 11 13:44:18 CET 2014


Hi,

I'm facing a strange behavior in a PUB/SUB pattern. I've modified the
psenvpub/psenvsub examples in order to publish different types of messages
so the subscriber can choose.

The publications are of type "A", "B" and "C".
The subscriber subscribes to to publications "A" and "C".
Run the programs and everything goes fine.
Restart the publisher and now the subscriber only gets messages of type "C"
(the "A" subscription was lost?).

If the subscriber subscribes to messages "A", "B" and "C", the situation is
the same, after publisher restart only messages of type "C" are received
(It seems that only the last subscription is kept).

Well, I don't known if it is a mistake in my code or something else. I'm
attaching the codes, but the are pretty the same as in the examples.
BTW, I'm building my examples with ZMQ v4.0.3.

Thanks in advance.

Best regards.

-- 
Diego Andrés Fons
Intraway Corp.
Solution Developer
AR Office: +54 (11) 6040 4000
US Office: +1 (516) 620 3890
Email: diego.fons at intraway.com

Visit our website at http://www.intraway.com
Proud to be an ISO 9001:2008 certified company
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140311/5a3b59a5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publisher2.cpp
Type: text/x-c++src
Size: 912 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140311/5a3b59a5/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subscriber2.cpp
Type: text/x-c++src
Size: 863 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140311/5a3b59a5/attachment-0001.cpp>


More information about the zeromq-dev mailing list