Quantcast
Channel: Active questions tagged zeromq - Stack Overflow
Viewing all articles
Browse latest Browse all 208

ZeroMQ and multiple subscribe filters in Python

$
0
0

I'd like to subscribe to multiple filters with ZeroMQ in Python, using one socket.

sock.setsockopt(zmq.SUBSCRIBE, 'first.filter')sock.setsockopt(zmq.SUBSCRIBE, 'second.filter')

But this doesn't work. Only the first one is taken in account. However, I read this on zeromq site:

Multiple filters may be attached to a single ZMQ_SUB socket, in which case a message shall be accepted if it matches at least one filter.

I'm using zmq 2.2.0.1. So, I wonder how to do that. Any ideas?


Viewing all articles
Browse latest Browse all 208

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>