[zeromq-dev] PAIR pattern doesn't reconnects when client restarted

Pieter Hintjens ph at imatix.com
Mon Jul 8 10:52:56 CEST 2013

Hi Sergey,

This is a fault in the implementation of PAIR sockets, something I
wanted to fix at some stage. As a workaround you can replace PAIR with
DEALER and it will work as intended.


On Sun, Jul 7, 2013 at 4:38 PM, Sergey Gavruk <svgavruk at gmail.com> wrote:
> Hello.
> If I disconnect my client in zmq (pub/sub, req/rep) and then connect again,
> it will continue to receive messages. But with PAIR pattern i faced a
> problem:
> I am using this example
> https://learning-0mq-with-pyzmq.readthedocs.org/en/latest/pyzmq/patterns/pair.html
> and I found that if I have both client and server running, then I stop-start
> server, 2 sockets will continue send and receive messages. But if I
> stop-start client - nothing will be printed to the terminal. Messages will
> not be sent and received.
> Here is my code:
> server.py
> http://pastebin.com/3bU93vSc
> client.py
> http://pastebin.com/2zdGXPCG
> So, I wonder: this is a bug or I am doing this wrong?
> pyzmq==13.1.0
> zeromq==3.2.3
> Thanks.
> --
> Best regards,
> Sergey Gavruk
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list