ofxZmq icon indicating copy to clipboard operation
ofxZmq copied to clipboard

ofxZmqPair doesn't deal with reconnects

Open elliotwoods opened this issue 10 years ago • 0 comments

hey. not sure if i'm using this 100% correctly but if i have 2 ofxZmqPair's:

  • Client
  • Server

If I quit the client and reopen, then the connection will not resume

However if I use a ofxZmqPublisher for the server and an ofxZmqSubscriber for the server then the connection does resume when reopening the client (but i've only got 1-way comms and I need 2-way).

The zeromq documentation generally says that all PUB's should be started before all SUB's, and also notes in the hello world example:

If you kill the server (Ctrl-C) and restart it, the client won't recover properly. Recovering from crashing processes isn't quite that easy. Making a reliable request-reply flow is complex enough that we won't cover it until Chapter 4 - Reliable Request-Reply Patterns.

Is there a pattern within zmq for re-establishing 2-way comms?

elliotwoods avatar Apr 12 '14 15:04 elliotwoods