On Wed, Feb 16, 2011 at 4:23 PM, Pieter Hintjens <[email protected]> wrote:
> No apologies, every single pubsub user hits this problem. IMO it's a > 0MQ design flaw though I'm not sure what the best solution would be. > > -Pieter > Perhaps this is somthing that could be solved with a new type of device. Like, we know the solution is some signalling that a subscriber is connected, and that it's ok to start sending messages, so perhaps a nice pre-packaged bit of code that will wait for a predetermined number of requests over a PULL socket (defaulting to 1 i'd imagine), and wraps the PUB in some functionality that returns EAGAIN until the PULL sock has hit the number of requests expected? It would kind of be a virtual socket type, something you could just address like a normal socket. void *ss = zmq_syncsub(&pub, &pull, 1); zmq_send(ss, zmsg); This kind of metasocket seems like a reusable style, much as the current in, out device format is. Ian
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
