[zeromq-dev] Queuing to multiple workers and receiving multiple responses as a single multi-part message.

Martin Sustrik sustrik at 250bpm.com
Sun May 9 23:06:14 CEST 2010

Hi John,

> I have a particular use case which I am not sure how to handle.  I want 
> to send a single request to many workers and have that message processed 
> in parallel by each worker.  Each worker should then send a response 
> which should make its way back to the originator of the request.  I've 
> attached a diagram which should hopefully explain what i'm on about.
> I thought I could set it up using a forwarder and a req/xrep socket. 
>  When send the message "0" (0x30) from the req socket, my xreq sockets 
> receives:
> "\x00\xC8s\x7F\xAB\xD8\x8DI\xD6\xB1\x98\xFD\xA7\xECO.L"
> ""
> "\x00\xC8s\x7F\xAB\xD8\x8DI\xD6\xB1\x98\xFD\xA7\xECO.L"
> "0"
> as a multi-part message.  I'm not sure what these fields mean, but is 
> the first part the to address, the next part should be the from address, 
> then a blank, then the message?  If so, then I don't know the return 
> address to send my message back to.  
> Any ideas on how to accomplish this with zmq?

First of all, can you explain what are you trying to achieve? Why 
process same data on multiple nodes? Is it meant to work as a hot-hot 


More information about the zeromq-dev mailing list