[zeromq-dev] REQ/REP for possibly async comm?

Andrei Zmievski andrei at zmievski.org
Tue Mar 27 00:21:08 CEST 2012


I have two processes that need to exchange data. Process A has to perform
time-critical work, but also needs to obtain some configuration data from
process B. Initially, I considered using REQ/REP sockets since it's a
roundtrip query, doing something like on A:

initialize work unit
if (previously sent request)
   check response from B
   if (still no response after 30 seconds)
      send config request
else
   send config request
finish work unit

The problem I see with REQ/REP is that they work in lockstep and that B may
not reply in a reliable fashion. Thus, I wouldn't be able to send a new
config request until I heard back from B.

Is it better to switch to PUB/SUB or DEALER/REP scheme here?

-Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120326/60c8d079/attachment.htm>


More information about the zeromq-dev mailing list