[zeromq-dev] conventions in bindings

Dirkjan Ochtman dirkjan at ochtman.nl
Fri Feb 3 12:12:29 CET 2012


On Fri, Feb 3, 2012 at 18:07, Ian Barber <ian.barber at gmail.com> wrote:
> 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.

Also, fixing the beginner mistake should be done by fixing the docs in
every place somewhat related to SUB sockets/pubsub,
not by introducing code that creates non-optimal performance scenarios
and/or is kind of hacky.

Cheers,

Dirkjan



More information about the zeromq-dev mailing list