[zeromq-dev] REQ/REP for possibly async comm?
Andrei Zmievski
andrei at zmievski.org
Wed Mar 28 01:35:15 CEST 2012
Michel,
Thanks for the example. However, from what I understand, this pattern does
not allow process A to re-send the request in case it has not received the
response after a certain amount of time, because REQ sockets don't allow
multiple messages?
-Andrei
> You can use non-blocking ROUTER on a poll loop and REQ or REP on the
> other end, that way you can handle requests and their responses as
> they come and as you compute them, respectively. Whether to use REQ
> or REP only matters for whichever end starts the conversation.
> The LRU pattern documented in the guide has a good implementation of
> this pattern with REQ->ROUTER->REP. It doesn't sound like you need
> the actual LRU part of the pattern, just the ROUTER->REQ part. See
> the code for an example how to use a ROUTER socket in non-blocking
> mode in a poll loop to handle out of order patterns like A then B
> requests but you respond B then A.
> Start here and read it a few times. :)
> http://zguide.zeromq.org/page:all#Least-Recently-Used-Routing-LRU-Pattern
> -Michel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120327/2a38ab1a/attachment.htm>
More information about the zeromq-dev
mailing list