[zeromq-dev] PUB/SUB with multiple publishers
Matt Weinstein
matt_weinstein at yahoo.com
Fri Jul 16 20:56:11 CEST 2010
I think your PUB from the second publisher went to the first publisher
at the other end of the pipe ?
You might try using a device() to connect two sets of sockets back-to-
back, just like the server example.
I believe you'd do something like
create "inproc://pubsource"
device:
bind as a SUB
subscribe to all ("")
publishers:
connect as a PUB
on the other side:
device:
bind as a PUB
subscribers
connect as a SUB
subscribe to all ("")
I think the "one way" device can be used as a model, you're only going
one way :-)
On Jul 16, 2010, at 2:06 PM, Dmitri Toubelis wrote:
> I call bind only once. The second time I use connect and it returns 0.
>
> Dmitri Toubelis
> Solution Architect / Director @ Alkeron Multimedia
> cell: +1-647-400-3876
> email: dmitri.toubelis at alkeron.com
>
>
> From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org
> ] On Behalf Of Chuck Remes
> Sent: July 16, 2010 1:48 PM
> To: 0MQ development list
> Subject: Re: [zeromq-dev] PUB/SUB with multiple publishers
>
> On Jul 16, 2010, at 12:34 PM, Dmitri Toubelis wrote:
>
>> I have a scenario when I need to use PUB/SUB scheme with multiple
>> publishers. Is it possible to do with "inproc" transport?
>>
>> Here is what I tried:
>> - create PUB socket and bind it to "inproc://pipe" endpoint
>> - create another PUB socket and connect it to the same "inproc://
>> pipe" endpoint
>> - create SUB socket for each subscriber and connect them to thre
>> "inproc://pipe" endpoint.
>> - publish message using second publisher.
>>
>> I'm getting no error, but message is not getting delivered to
>> subscribers. Am I doing something wrong?
>
> I don't think it is possible to have multiple sockets bind to the
> same endpoint. Are you certain that the result code from calling
> bind is 0? If it is, then this is likely a bug and should be
> reported (with sample code).
>
> Alternately, if you are running this on Windows then I don't think
> inproc or ipc transports are supported on that platform. That should
> also error out (if you are on Windows).
>
> cr
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100716/4e350f71/attachment.htm>
More information about the zeromq-dev
mailing list