[zeromq-dev] PUB/SUB with multiple publishers
Dmitri Toubelis
dmitri.toubelis at alkeron.com
Mon Jul 19 06:21:04 CEST 2010
Thanks. This is exactly what I did with Matt's help. Works like a charm.
> -----Original Message-----
> From: zeromq-dev-bounces at lists.zeromq.org
> [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of chris
> Sent: July 19, 2010 12:17 AM
> To: zeromq-dev at lists.zeromq.org
> Subject: Re: [zeromq-dev] PUB/SUB with multiple publishers
>
> Dmitri Toubelis <dmitri.toubelis <at> alkeron.com> writes:
> > I have a scenario when I need to use PUB/SUB scheme with
> multiple publishers.
>
> If I've understood you correctly...
>
> You'll need a topology that looks like this:
>
> pub sub
> \ /
> pub-s1--fsub/fpub--s2-sub
> / \
> pub sub
>
> Both the 'pub'lishers and the 'sub'scribers must "connect" to
> their respective
> sockets, s1 and s2.
>
> fsub and fpub must "bind" s1 and s2 sockets respectively and
> can use a simple
> forwarder device as an implementation.
>
> Basically, what you do, is create two sockets. Bind s1 as
> ZMQ_PUB and bind s2
> as ZMQ_SUB. Create ZMQ_FORWARDER devices having s1 as the
> insocket, and s2 as
> the outsocket.
>
> Then, as you need, connect publishers to s1 and connect
> subscribers to s2.
>
> regards,
>
> chris
>
>
> _______________________________________________
> 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