Completely agree here Justin. It would probably be best to work like normalish sockets (where there's one sender, one receiver) where if it's set to blocking, it would block when all queues are full, but if non-blocking it would return false on send and set errno to EAGAIN when all queues are full. I definitely agree that when there are no receivers it should also return false or block, but perhaps use a different errno.
I think this is a common enough use case, and we'd also be backward compatible. For example, if a user set the socket to non-blocking and ignored the return value, it would behave exactly as the current implementation does. In my case I'm using the epgm protocol here, so there's really no way for me to know who's listening, but this functionality would work for both types of PUBs. Either way, I'd like to add this functionality to ZeroMQ, I just need a mentor to give me a hand with it. On 21/09/2012 7:26 PM, Justin Karneges wrote: > In my previous message I suggested that writes to a pub socket should block if > all subscribers' queues were full. _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
