Menu

can't set ZMQ_HWM

2016-11-17
2016-11-17
  • Robert Tusa

    Robert Tusa - 2016-11-17

    Hello,

    I'd like to set the ZMQ_HWM option to prevent my publisher from crashing my application on buffer issues with slow subscribers but I noticed that the option in the Enum is disabled and that there is no case handling the option in the zmq_setsocketopt.vi thus i am getting error 22.

    is there any reason why i'm not able to do this?

    regards,

    Robert

     
  • Martijn Jasperse

    Hello,
    The reason is that the ZMQ_HWM option is considered obsolete and is no longer supported. The solution is to individually set ZMQ_SNDHWM and ZMQ_RCVHWM, which are the HWMs for the sending and receiving queues respectively. See the API reference for more information, http://api.zeromq.org/3-2:zmq-setsockopt

    Historically ZMQ_HWM was just a convenience routine for setting both of these at the same time.

    Cheers,
    Martijn

     
  • Robert Tusa

    Robert Tusa - 2016-11-17

    Mello Martijn,

    I must have not seen the forest for the trees :)
    Thank you for your quick response.

    Robert

     

Log in to post a comment.