[zeromq-dev] PUB/SUB with multiple publishers

chris jugg at hotmail.com
Mon Jul 19 07:06:14 CEST 2010


Dmitri Toubelis <dmitri.toubelis <at> alkeron.com> writes:
> 
> Thanks. This is exactly what I did with Matt's help. Works like a charm.

Glad you got it working... for anyone else reading this, below I had mistakenly
swapped the socket types during binding, it should instead say this:

"Basically, what you do, is create two sockets.  Bind s1 as ZMQ_SUB and bind s2
as ZMQ_PUB.  Create ZMQ_FORWARDER devices having s1 as the insocket, and s2 as
the outsocket."

chris

> > 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.





More information about the zeromq-dev mailing list