Jason Foster created CAMEL-7009: ----------------------------------- Summary: RabbitMQ Consumer does not pick up REPLY_TO Key: CAMEL-7009 URL: https://issues.apache.org/jira/browse/CAMEL-7009 Project: Camel Issue Type: Bug Components: camel-rabbitmq Affects Versions: 2.12.1 Reporter: Jason Foster
When using RPC in RabbitMQ, the producer sets up an exclusive queue and specifies that queue as the reply_to on outgoing messages. When the consumer in camel-rabbitmq receives the messages, the reply_to isn't available on the exchange, so no RPC calls can be completed. The following Python script (from RabbitMQ In Action) produces the message with a reply_to property: import time, json, pika creds_broker = pika.PlainCredentials("guest", "guest") conn_params = pika.ConnectionParameters("localhost", virtual_host = "/", credentials = creds_broker) conn_broker = pika.BlockingConnection(conn_params) channel = conn_broker.channel() msg = json.dumps({"client_name": "RPC Client 1.0", "time" : time.time()}) result = channel.queue_declare(exclusive=True, auto_delete=True) msg_props = pika.BasicProperties() msg_props.reply_to = result.method.queue channel.basic_publish(body=msg, exchange="talentsprout.rpc", properties=msg_props, routing_key="ping") print "Sent 'Ping' RPC call. Waiting for reply..." def reply_callback(channel, method, header, body): """Receives RPC server replies.""" print "RPC Reply --- " + body channel.stop_consuming() channel.basic_consume(reply_callback, queue=result.method.queue, consumer_tag=result.method.queue) channel.start_consuming() The following route in Camel would consume messages from this queue: from("rabbitmq://192.168.213.130/talentsprout.rpc?queue=ping&routingKey=ping&durable=False&autoDelete=False&autoAck=False&username=guest&password=guest") .log("Headers: ${headers}"); The log statement from that route shows that no reply_to header is added. Without this feature, RPC from external producers cannot work. -- This message was sent by Atlassian JIRA (v6.1#6144)