[zeromq-dev] Question about router-dealer sockets

Ian Barber ian.barber at gmail.com
Fri Nov 30 17:50:59 CET 2012

On Fri, Nov 30, 2012 at 4:38 PM, Marco Trapanese
<marcotrapanese at gmail.com>wrote:

> Il 30/11/2012 00:36, Michel Pelletier ha scritto:
> > Yes.  0mq pushes messages as far to the receiver as possible as soon as
> > possible.  Linger only effects messages that have not yet been
> > transmitted from the senders queue.  If your message got sent to the
> > router and it's in the routers queue, then the router will receive it,
> > regardless of the state of the sender at that point.
> What is the purpose of this behavior?
> I can't imagine such an application where I want to either transmit or
> receive something if *both* ends aren't running.

Its just message queuing. In the case in OP, the dealer sends, say, 10
messages, which get transmitted to the other party (the router socket) and
queued there. If the application controlling the router socket does
zmq_recv(), it'll get one of them. If the dealer disconnects, the other 9
are still in the queue on the router socket, available for the app to
consumer as it wants.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121130/224d54b6/attachment.htm>

More information about the zeromq-dev mailing list