[nanomsg] Re: Trying to implement "directory" pattern

  • From: Paul Colomiets <paul@xxxxxxxxxxxxxx>
  • To: Martin Sustrik <sustrik@xxxxxxxxxx>
  • Date: Tue, 26 Feb 2013 10:49:43 +0200

Hi Martin,


On Mon, Feb 25, 2013 at 11:48 PM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:

> On 25/02/13 21:55, Paul Colomiets wrote:
>
>  Disabling UNSUBSCRIBE is bad solution. Too limited.
>>
>
> Are you actually using unsubscriptions? I would like to get a real-world
> use case for it, if possible.
>
>
You caught me, I don't use subscriptions at all :) I always subscribe on
empty string. But, in old times in zeromq there was no zmq_shutdown. It
works 90% of the cases, but there are important ones where it's needed.
Similarly, zmq folks adviced to close and reopen ZMQ_REQ socket when
timeout reached. It was never percepted as the feature.


>
>  Another issue. If I call nn_shutdown and then nn_connect, the
>> subscriptions should be resent, am I right? When you would block in this
>> case? Similar thing may occur internally when TCP connection broken
>> because of network issues and reconnected.
>>
>
> Good observation. I am probably not right.
>
> Do you have an idea what should subscription forwarding should do in case
> of TCP pushback?


At the moment I don't see any other solutions, except buffering, and if
connection does no progress for some time, drop it.

-- 
Paul

Other related posts: