Exemplo n.º 1
0
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")
Exemplo n.º 2
0
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")
Exemplo n.º 3
0
def request():
    msg_reply = consumer.listen(on_response)
    print("message received: " + str(msg_reply))