Router-Dealer not working correctly
aaronovz1 opened this issue · 1 comments
aaronovz1 commented
I have a router-dealer system setup but it doesn't appear to be working fully. I can send a message from a dealer to the router but when sending a reply back to the dealer, it never receives a message.
Router
- Binds to localhost on TCP
- Runs the receive() function in a separate thread and has receive_timeout set to 2 seconds
Dealer
- Connects to localhost on TCP
- Runs the receive() function in a separate thread and uses zmqpp::poller
- Poll always times out and never gets any reply back from server
I have attached a slimmed down version of my classes. Hoping there is just something simple I have messed up in the configuration.
aaronovz1 commented
Turns out I was doing it all wrong in terms of multi-threading and ZMQ. I also needed to make sure I sent the identity of the client with the reply from the server.
Would be nice to see some examples of zmqpp replicate the examples from the original ZMQ guide.