[zeromq-dev] Question about router-dealer sockets

Michel Pelletier pelletier.michel at gmail.com
Fri Nov 30 00:36:56 CET 2012

On Thu, Nov 29, 2012 at 3:34 PM, Stathis Gkotsis <
stathis.gkotsis at commsquare.com> wrote:

> Hi,
> I am using zmq 3.2.2. In my application I use a dealer socket for the
> client and a router socket for the server. I send some messages from the
> dealer socket, which are not yet received by the router socket with
> zmq_recv(). Then, I close the dealer socket, open it again but I see that
> some of the previous messages are still received by subsequent calls to
> zmq_recv() on the other end. Linger is set to 0. Is this behaviour normal?

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.


> Should I look for bugs in my app code or in the bindings' code?
> Thanks,
> Stathis
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121129/e4fddae2/attachment.htm>

More information about the zeromq-dev mailing list