Need help cloning? Visit
is a free Git and Mercurial client for Windows.
is a free Git and Mercurial client for Mac.
+# make connection to RabbitMQ server
+connection = pika.BlockingConnection(pika.ConnectionParameters(
+channel = connection.channel()
+# Prepare the recipient queue -- do this in both places so it doesn't matter which one runs first
+# Print a handy message
+print ' [*] Waiting for messages. To exit press CTRL+C'
+# The thing to do when a message is received
+def callback(ch, method, properties, body):
+ print " [x] Received %r" % (body,)
+# Set up the consumer
+# Start consuming
+# Send the message
+ body='Hello World!')
+print " [x] Sent 'Hello World!'"
+# Close up shop, flushing buffers and the like