Hi Maciej,
I had a same issue and go it worked with following approach. *Let’s consider Module A is a requester who will request for some data .* *Module B is responder who needs to respond with some data.* Step 1 : Module A sends a request to Module B with some unique Id . Setp2 : Module B respond immediately with “OK” response which notifies “A” that “B” has received the request successfully. *Now Module “A” is free to send other requests to Module B * Step3 : Module B Processes the request and will send another ZMQ Req to Module A as a response for the request which it has received in step 1. It provides same request id along with the processed data in payload. Step4 : Module A has to respond with “Ok” messaged to notify Module B that it has received the response. *Now Module “B” is free to send other responses to Module A . * Let me know if this helps . [image: cid:[email protected]] Regards, Prasad. *From:* zeromq-dev [mailto:[email protected]] *On Behalf Of *Maciej Wewior *Sent:* Tuesday, July 19, 2016 2:22 PM *To:* [email protected] *Subject:* [zeromq-dev] multiple REQ-REP sockets, polling responses Hi all I have 2 nodes communicating by means of multiple ZMQ sockets. The way they talk to each other is request-response, from some reasons I want to have separate sockets for each established connection. Since they communicate in the classic request-response manner I thought I could use REQ-REP ZMQ socket pair for each socket connection. But then I realised that due to synchronous nature of REQ-REP I will have to wait for each single response till I'm able to send a request on another ZMQ socket (and I don't want this restriction). Could someone give me an advice how to deal with that using ZMQ? I would like to be able to send some number of requests through separate sockets one after another (without waiting for response) and then poll all the responses and process them one after another (order doesn't matter). (I now I could for example use PUB-SUB socket pair instead of one REQ-REP socket and fire requests using the 1st ones from the pair and poll the responses from the 2nd ones, but that seems more complex than I would like it to be) Thanks in advance. -- Maciej Wewior Senior Software Developer fixed +48 22 213 8297 [image: cid:[email protected]] IS-Wireless ul. Pulawska 45b 05-500 Piaseczno/near Warsaw Poland, EU http://is-wireless.com
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
