def send_message(): queue = Queue() queue.connect(connection_params) body = json.dumps({"Body":"Test"}) queue.send(exchange_name, "test.send", body, exchange_type="topic")
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])