[rabbitmq-discuss] a shared queue problem

陆云龙 ludy at wawame.cn
Fri Aug 19 13:55:11 BST 2011


on java api guide page ,you can find that If several clients want to share a queue with a well-known name, this code would be appropriate:

channel.exchangeDeclare(exchangeName, "direct", true);
channel.queueDeclare(queueName, true, false, false, null);
channel.queueBind(queueName, exchangeName, routingKey);

when i do that one routingKey is aa,another is bb,start aa first,then start bb,when i send message by routing bb,the first routingKey aa client receives the message,but the message i want to send to routingKey bb client.

start aa routingKey client--->start bb routingKey client--->send routingKey bb message--->routingKey aa receive the message--->send routingKey bb message--->routingKey bb receive the message--...
why message is not arrive the correct client by routingKey???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110819/adf1b7f1/attachment.htm>


More information about the rabbitmq-discuss mailing list