[zeromq-dev] What ZMQ socket state is maintained upon disconnect?
Pieter Hintjens
ph at imatix.com
Thu Jul 25 15:18:59 CEST 2013
On Tue, Jul 23, 2013 at 12:31 PM, Merijn Verstraaten
<merijn at inconsistent.nl> wrote:
> Lines like "• SHALL create a queue when a subscriber connects to it. If this subscriber disconnects, the PUB socket SHALL destroy its queue and SHALL discard any messages it contains." from the PUBSUB RFC lead me to believe that while the protocol dictates automatic reconnects upon connection loss, the listening side is not required to maintain state?
Right. The listener does not keep state on connection loss. The
library _used_ to have durable identities but that was both nasty to
implement, and unsafe since holding arbitrary state in servers makes
them fragile. That functionality disappeared in libmq 3.0 and is not
defined in the protocol.
-Pieter
More information about the zeromq-dev
mailing list