+# 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 ' [*] 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,)