def main(title): print title # c = consumer.Consumer(__HOST__, __PORT__, __USER__, __PASS__, __QUEUE__) # c.run_with_callback(on_event) consumer.listen(on_event) # restart main("restart")
def request(): msg_reply = consumer.listen(on_response) print("message received: " + str(msg_reply))