[zeromq-dev] Distributed application with REQ REPLY sockets

Patrick preedy73 at gmail.com
Mon Aug 13 21:33:17 CEST 2018


I see. I currently have the zmq transport encapsulated, so each worker piece simply call transport.send(piece) and within the send call is the zmq.send and zmq.recv. I’ll have rework this to implement the two loop method. 

Thanks

> On Aug 13, 2018, at 2:54 PM, Justin Azoff <justin.azoff at gmail.com> wrote:
> 
>> On Mon, Aug 13, 2018 at 2:51 PM Patrick <preedy73 at gmail.com> wrote:
>> 
>> Since I’m using the REQ REPLY sockets it is behaving like the first method - both send and recv within one loop.
>> 
>> How can I use zmq to achieve the behavior in the 2nd method? I’m assuming it can’t be done using the REQ REPLY sockets I have in place.
> 
> It can.. you'd do it just like I showed.. you just need to loop twice.
> Instead of doing send/recv 100 times, send all 100 items first, then
> recv all 100 responses.
> 
> -- 
> - Justin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev


More information about the zeromq-dev mailing list