<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>a shared queue problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>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:<BR>
<BR>
channel.exchangeDeclare(exchangeName, "direct", true);<BR>
channel.queueDeclare(queueName, true, false, false, null);<BR>
channel.queueBind(queueName, exchangeName, routingKey);<BR>
<BR>
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.<BR>
<BR>
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--...<BR>
why message is not arrive the correct client by routingKey???</FONT>
</P>
</BODY>
</HTML>