[zeromq-dev] conventions in bindings
ian.barber at gmail.com
Fri Feb 3 12:07:49 CET 2012
On Fri, Feb 3, 2012 at 10:20 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> On Wed, Feb 1, 2012 at 05:17, MinRK <benjaminrk at gmail.com> wrote:
> > 2. SOCKOPT defaults
> > Default values vary, and czmq makes some choices that differ from libzmq:
> > * SUB sockets default to SUBSCRIBE("") instead of None
> I found this one a bit worrying, and if I've read the thread
> correctly, Pieter didn't respond to it (though Martin S. responded he
> thought it was a bad idea).
I have to say that with pub side filtering I think not having subscribe all
as a default makes even more sense - the socket shouldn't be sending a
subscribe message on creation unless you explicitly ask it to. Yes it's a
mistake that pretty much every beginner makes, but if we wanted to make
that impossible we could just throw an error if you try and do a blocking
recv() on a SUB socket that has no subscriptions whatsoever - a state I
can't think of any realistic use cases for.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev