Why doesn’t zeromq work on localhost?

As @fdb points out: The problem is at line: subscriber.bind(“tcp://localhost:5555”) try to change to: subscriber.bind(“tcp://127.0.0.1:5555”) However this deserves more explanation to understand why. The documentation for zmq_bind explains (bold emphasis mine): The endpoint argument is a string consisting of two parts as follows: transport://address. The transport part specifies the underlying transport protocol to use. The … Read more

zeromq: how to prevent infinite wait?

If you are using zeromq >= 3.0, then you can set the RCVTIMEO socket option: client_receiver.RCVTIMEO = 1000 # in milliseconds But in general, you can use pollers: poller = zmq.Poller() poller.register(client_receiver, zmq.POLLIN) # POLLIN for recv, POLLOUT for send And poller.poll() takes a timeout: evts = poller.poll(1000) # wait *up to* one second for … Read more

Performance comparison between ZeroMQ, RabbitMQ and Apache Qpid

RabbitMQ is probably doing persistence on those messages. I think you need to set the message priority or another option in messages to not do persistence. Performance will improve 10x then. You should expect at least 100K messages/second through an AMQP broker. In OpenAMQ we got performance up to 300K messages/second. AMQP was designed for … Read more