After playing around with the XPUB/XSUB/PUB/SUB, I found that it won't work. XPUB only receives messages when a brand new subscription is received or the all the subscribers unsubscribe. For example:
sub.subscribe([2, 2, 3, 5) xsub.send([1, 2, 2, 3, 5], 0) xpub.recv(0) // this is [1, 2, 2, 3, 5] xpub.recv(0) // this will block because it is the same subscription Joshua On Dec 29, 2011, at 1:49 PM, Joshua Foster wrote: > They are only available in 3.x and up. See the man pages for a description. > http://api.zeromq.org/3-1:zmq-socket > > Joshua > > > On Dec 29, 2011, at 12:26 PM, Yi Ding wrote: > >> Is XPUB/XSUB only available in versions 3.0 and up? >> >> I've read the guide and don't see anything mentioned about them in there. >> >> Thanks, >> Yi >> >> On Wed, Dec 28, 2011 at 5:50 PM, Joshua Foster <[email protected]> wrote: >>> I'm wondering if you could use an XPUB and XSUB socket. You know when to >>> start sending when you receive a subscription. >>> >>> Joshua >>> >>> On Dec 28, 2011, at 5:42 PM, Yi Ding wrote: >>> >>>> Hi everyone, >>>> >>>> I've been trying to build this program where I have multiple publishers >>>> (where each publisher represents a distinct data source). To avoid the >>>> slow joiner problem, it looks like the preferred mechanism (correct me if >>>> I'm wrong) is to use a REQ-REP socket to send a synchronization packet >>>> from the client to the server at which time the server knows it's "safe" >>>> to start sending out data to the client. >>>> >>>> So my question is, what's the preferred way to synchronize/prevent slow >>>> joiner when I'm listening to multiple publishers? I've considered >>>> connecting a single REQ socket to multiple REP sockets, using one REQ >>>> socket per publisher, using PUSH/PULL or DEALER/ROUTER sockets. >>>> >>>> Thanks, >>>> Yi >>>> _______________________________________________ >>>> zeromq-dev mailing list >>>> [email protected] >>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> [email protected] >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
