[zeromq-dev] inproc pub/sub socket connection

T-zex tranzenziuzex at gmail.com
Thu Nov 18 18:51:57 CET 2010


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?

I understand about multiple types for endpoints, our concern is only
inproc type.
My guess is that inproc sockets are implemented very differently from
tcp and there should be no lost messages on connect.

On Thu, Nov 18, 2010 at 5:08 PM, Chuck Remes <cremes.devlist at mac.com> wrote:
>
> On Nov 18, 2010, at 11:00 AM, T-zex wrote:
>
>> Thank you Pieter,
>>
>> We are using 2.0.10, and trying to create a forwarder which forwards
>> messages from multiple threads to multiple subscribers. The forwarder
>> listens to multiple inproc publishers. This forwarder also implements
>> tcp subscriber coordination as described in the guide (through REQ REP
>> tcp sockets). Guide also states that sockets shold be created and used
>> in the same thread. I am bit confused now how to coordinate iproc
>> publishers.
>
> What is the specific confusion? An inproc endpoint can be treated the same as an ipc or tcp endpoint.
>
> Your PUB/SUB forwarder can easily bind to an inproc endpoint *and* a tcp endpoint and do its job. If you ever decide to move one or more publishers out of the process space, the forwarder could bind to multiple inproc and tcp endpoints. The publishers that you moved could then connect to the "incoming" tcp endpoint while the publishers in process space continued to connect to the same inproc endpoint.
>
> Forwarder...
>
> __________________
>
> inproc ---
>              |
>               Incoming
>             |
> tcp ------
>
>
> tcp ------- Outgoing
>
> __________________
>
> My ascii art is probably terrible, but hopefully you get the idea.
>
> The same is true for a queue device used by the REQ/REP coordination sockets.
>
> The lesson here is that a 0mq socket can bind (and connect) to multiple endpoints of varying types.
>
> cr
>
> _______________________________________________
> 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