[zeromq-dev] Router-Router Reconnection Issue
Jeremy Im
bngjim425 at gmail.com
Tue Jun 3 23:13:12 CEST 2014
Hello,
We're using 0mq to great success, but we've run into a problem in using
router-router connections; we are using explicit socket identities so that
we can perform addressing from a single 0mq socket (e.g. on the client, we
will connect to multiple servers by calling zmq_connect multiple times, and
put the socket identity of the desired target server). The issue we are
running into is when the server is taken offline, then brought back online,
the client can no longer communicate with it.
The following code snippet reproduces the issue we are seeing:
https://gist.github.com/anonymous/0758bb155575aeb090cc
- Upon the server socket being closed, the client socket enters a
reconnect loop
- Even if zmq_disconnect is called on the client socket, it remains in
the reconnect loop
- Upon the server socket being available again, the reconnect loop
recreates the connection
- A subsequent zmq_connect from the client socket succeeds
- When sending a message, no message is received on the server
If I comment out lines 237 and 245, the server does receive the message
from the client. However, the monitor output would seem to indicate that
there's no way to halt the reconnect loop short of closing the client
socket. Is that the intended behaviour?
Thanks,
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140603/68b6c6b2/attachment.htm>
More information about the zeromq-dev
mailing list