[zeromq-dev] inproc pub/sub socket connection

T-zex aidas.ozelis at gmail.com
Fri Nov 19 09:02:37 CET 2010


Thank you guys!

On 18 Nov 2010, at 18:33, Pieter Hintjens wrote:

> On Thu, Nov 18, 2010 at 6:51 PM, T-zex <tranzenziuzex at gmail.com>  
> wrote:
>> What we have is:
>>
>> inproc(a)---
>>               |
>>               Incoming(c)
>>               |
>> inproc(b)--
>>
>> And the question is when we bind a and b and then do connect on c, is
>> message delivery guaranteed form a and b to c? or do we need to do
>> extra coordination?
>
> You'd want to bind on c and then connect from a and b, and use
> explicit coordination to ensure the connect happens after the bind.
>
> My previous emails were unclear, I suggested you connect and bind one
> socket.  In fact if a and b were child threads of c, what you'd do is:
>
> - create three sockets, call them socka, sockb, sockc
> - bind sockc to the inproc endpoint
> - connect socka and sockb to the inproc endpoint
> - start a thread for a, and pass it socka
> - start a thread for b, and pass it sockb
>
> That is the most elegant coordination mechanism I know of today.  It
> requires 2.1.0 and is not documented in the Guide.  The alternatives
> explained in the Guide tend to involve sleep() statements.
>
> As Chuck says, maybe future versions of 0MQ will support  
> disconnected inproc.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list