예제 #1
0
def send_message():


    queue = Queue()
    queue.connect(connection_params)
    body = json.dumps({"Body":"Test"})
    queue.send(exchange_name, "test.send", body, exchange_type="topic")
예제 #2
0
def receive_message():
    queue = Queue()
    queue.connect(connection_params)
    queue.receive(None, print_body, exchange_name=exchange_name, finish_on_empty=False, routing_key=sys.argv[2])