Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ZMQ multicast consumer example
# consumer
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect('epgm://239.192.1.1:5000')
socket.setsockopt(zmq.SUBSCRIBE, 'test')
socket.setsockopt(zmq.SUBSCRIBE, 'topic_1')
while True:
data = socket.recv()
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment