How to have limited ZMQ (ZeroMQ - PyZMQ) queue buffer size in python?

前端 未结 2 742
半阙折子戏
半阙折子戏 2020-12-18 09:04

I\'m using pyzmq library with pub/sub pattern. I have some quick ZMQ publisher by .connect() method and a

2条回答
  •  臣服心动
    2020-12-18 09:45

    To set the queue/buffer size you need to set the high water marks via the socket options

    setsockopt(zmq.SNDHWM, 10)
    setsockopt(zmq.RCVHWM, 10)
    

提交回复
热议问题