[zeromq-dev] Assert in XSUB (send_subscription)
Martin Sustrik
sustrik at 250bpm.com
Tue Dec 20 01:21:04 CET 2011
On 12/20/2011 02:29 AM, Daniel Lundin wrote:
>> Blocking seems the right strategy since it's consistent with other
>> reliable outgoing sockets.
>
> +1 it's what I would expect as well.
>
> What about zmq_setsockopt? Should there be a nonblocking version of
> ZMQ_SUBSCRIBE to emulate behavior of send (on XSUB)?
>
> Masking perhaps?
>
> zmq_setsockopt(sub_s, ZMQ_SUBSCRIBE | ZMQ_NOBLOCK, "foo", 3)
>
> Too ugly? :)
Note that there's an XSUB socket underneath the SUB socket. Those not
happy with the amount of control provided by SUB socket can use raw XSUB
socket instead.
XSUB treats subscriptions as standard messages so you get all the
control you possibly get.
Martin
More information about the zeromq-dev
mailing list