[zeromq-dev] Basic forwarder question

Anubhav Jain anubhav.nitt at gmail.com
Tue Feb 14 13:22:15 CET 2012



Joshua Foster <jhawk28 <at> gmail.com> writes:
 
> > Now, I want an arbitrary number of publishers and an arbitrary number of
> > subscribers.  So, I run a forwarder:
> >
> > context = zmq.Context(1)
> > publishers = context.socket(zmq.SUB) # Also tried flipping PUB and SUB
> > publishers.bind("tcp://127.0.0.1:5555");
> > subscribers = context.socket(zmq.PUB)
> > subscribers.bind('tcp://127.0.0.1:5556')
> >
> > zmq.device(zmq.FORWARDER, publishers, subscribers)
> >
> > and made my sender connect to 5555 instead of binding 5559 (and have my
> > receiver connect to 5556).
> >
> > I don't get any messages.  Is this how a forwarder should work?
> >
> > Thanks.
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev <at> lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 

Can we have multiple SUB sockets for a single forwarder ? 
for example 
i have 5 publishers publishing to different port, now i want to publish on a
single port by using forwarder, which will have 5 SUB sockets subscribed to
different publishers and have one pub socket. 



Thanks







More information about the zeromq-dev mailing list