[zeromq-dev] REP/REQ state-locking
Amr Ali
amr.ali.cc at gmail.com
Thu Apr 28 18:39:41 CEST 2011
That's indeed helpful, I've read all 3 chapters, it seems there is 2 new chapters.
Thanks
On 04/28/2011 06:29 PM, Pieter Hintjens wrote:
> On Thu, Apr 28, 2011 at 6:16 PM, Amr Ali <amr.ali.cc at gmail.com> wrote:
>
>> I've stumbled upon the problem that when for whatever reason a send from a REQ
>> socket can't be complemented by a recv, the state locked and there is no way
>> (IIRC) to reset the socket to be able to continue using it.
>
> You close and reopen the socket.
>
> It's actually more elegant than it sounds, especially if you're
> resending requests, because any en-route replies will be discarded.
> Here's more detail on that:
>
> http://zguide.zeromq.org/page:all#Client-side-Reliability-Lazy-Pirate-Pattern
>
>> I've seen a couple
>> of emails suggesting the usage of XREP/XREQ over the pattern locked REP/REQ
>> sockets, which works for me, however, are there any plans to mitigate the
>> situation? I think this can be solved by providing a reset functionality for a
>> certain socket. I believe such functionality is needed regardless of the socket
>> type anyways.
>
> While a reset option sounds good, it probably won't work as well as
> closing/reopening the socket, which generates a new identity.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110428/e061b8be/attachment.sig>
More information about the zeromq-dev
mailing list