Skip to content

Instantly share code, notes, and snippets.

@ruedesign
Created March 22, 2013 06:49
Show Gist options
  • Save ruedesign/5219459 to your computer and use it in GitHub Desktop.
Save ruedesign/5219459 to your computer and use it in GitHub Desktop.
ZeroMQ Subscriber sample (Publish-Subscribe Model)
import zmq
context = zmq.Context()
sub = context.socket(zmq.SUB)
sub.setsockopt(zmq.SUBSCRIBE, "")
sub.connect("tcp://127.0.0.1:5555")
while True:
print "recv:", sub.recv()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment