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

  • From: Paul Colomiets <paul@xxxxxxxxxxxxxx>
  • To: Martin Sustrik <sustrik@xxxxxxxxxx>
  • Date: Mon, 25 Feb 2013 22:55:32 +0200

Hi Martin,


On Mon, Feb 25, 2013 at 9:54 PM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:
>
>      It doesn't block yet, because the subscription forwarding is not yet
>>     implemented, but yes, I would say it should block.
>>
>> Well, I believe that all blocking calls should have a non-blocking
>> counter-parts. Having non-blocking counter-part for this one seems to
>> complicate API.
>>
>
> Good point. What's the alternative here?
>
> I can imagine not allowing unsubscriptions in pub/sub (only way to
> unsubscribe would be to close the socket). Then, instead of using
> SUBSCRIBE/UNSUBSCRIBE options, one can just send the subscription as a
> message.


Disabling UNSUBSCRIBE is bad solution. Too limited.

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.


-- 
Paul

Other related posts: