from. http://www.rabbitmq.com/tutorials/tutorial-four-python.html