[zeromq-dev] pub/sub env example not working...

Sean Ochoa sean.m.ochoa at gmail.com
Sun Jun 5 22:11:08 CEST 2011

@Chuck:  Thanks!!!! That did the trick.  I wonder if you could help me
understand why I need to wait for a bit for it to kick into gear?  I'm sure
I missed it while reading through the guide.

Oh, and I've updated my sample here:
http://paste.pound-python.org/show/7790/ in case others want to take a look.

On Sun, Jun 5, 2011 at 12:12 PM, Chuck Remes <cremes.devlist at mac.com> wrote:

> On Jun 5, 2011, at 2:05 PM, Sean Ochoa wrote:
> I'm wondering if someone would be able to take a look at my sample pub/sub
> example to see what I'm doing wrong.
> http://paste.pound-python.org/show/7779/
> I've got a publisher sending multipart msgs over the wire, one has the
> prefix "A" and one "B".  And my subscriber only wants the "B" messages.  As
> compared to the pubenv <http://zguide.zeromq.org/py:psenvpub>/subenv<http://zguide.zeromq.org/py:psenvsub>example on the guide, I've combined it into a single script.   Oh, and as a
> side note, I've been able to run the pubenv/subenv example from the guilde
> locally in separate scripts.
> You may need a "sleep" between the socket creation steps (bind, connect,
> setsockopt) and the actual transmission of the messages. The bind & connect
> operations are asynchronous, so they may not complete by the time you get to
> the logic that sends all of the messages. In that case, any messages sent
> through the PUB socket will be *dropped* since a zmq_bind() operation does
> not create a queue until another socket has successfully connected to it.
> As a side note, you don't need to create 2 contexts in this example. Both
> sockets can be created within the same context. It doesn't hurt, but it also
> isn't necessary.
> cr
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Sean | (206) 962-7954
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110605/7521b247/attachment.htm>

More information about the zeromq-dev mailing list