[zeromq-dev] multiple REQ-REP sockets, polling responses
David Jelenc
david.jelenc at fri.uni-lj.si
Tue Jul 19 11:01:21 CEST 2016
Maciej,
if your connection is 1-to-1 and you want to be fully asynchronous, you
can use DEALER-DEALER. See the zguide for more information on this.
Best,
David
On 19. 07. 2016 10:52, Maciej Wewior wrote:
> 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
>
> IS-Wireless
> ul. Pulawska 45b
> 05-500 Piaseczno/near Warsaw
> Poland, EU
> http://is-wireless.com <http://is-wireless.com/>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list