[zeromq-dev] PUB/SUB does not reconnect when unplug the cable
Martin Sustrik
sustrik at 250bpm.com
Thu Jan 13 09:50:34 CET 2011
Hi,
> But when i unplug the cable of
> subscribe, then plug it again, the subscribe does not auto reconnect to
> publisher and does not receive messages anymore. Is this a bug?
That's how TCP behaves. If you unplug the cable it has no way to tell
whether that the other end is inaccessible. However, I would expect TCP
connection to catch on once the cable is re-plugged.
> Another problem is when i call the function connect two times in
> subscribe, i will receive a message two times in subscribe, if i call 3
> times, i will receive the message 3 times. Is this the normal behavior
> or it's a bug?
It's a normal behaviour. 0MQ allows you to connect to multiple
publishers. In such case you get messages from all of them. In this case
you are connected to the same publisher via 3 connections, thus you are
getting every message thrice.
Martin
More information about the zeromq-dev
mailing list