On 11/21/2012 09:51 AM, eugene wrote:
Logs in the email again.

This is a bit confusing now. So, the queue gets deleted, the message goes to
the the amq.topic exchange.

Then it must be routed to the Topic that I have if the binding key and
routing key match.

Yes, the routing through the alternate exchange works just as usual publishing to an exchange does. The message will only go to those subscribers who have indicated an interest in the message (and this is done through the routing-key).

I do have the binding ket set to : TEST_QUEUE, but there is no routing key
in the message.. So the message will get discarded. I think I am supposed to
also set the routing key in the message.

No, that will be done for you when you send it to the queue in the first place. You can see the correct value in the log:

{DeliveryProperties: priority=4; delivery-mode=2; timestamp=1353569216659; 
exchange=; routing-key=TEST_QUEUE; }}]

However looking closer, I see another issue. The TEST_QUEUE is not in fact created with the exclusive flag set:

{QueueDeclareBody: queue=TEST_QUEUE; alternate-exchange=amq.topic; 
auto-delete=1; arguments={no-local:F1:boolean(0)}; }

When auto-delete is set without the exclusive flag, the queue is deleted only when the consumer count drops back to zero having been non-zero. If there is never a consumer, the queue won't be deleted. You should be able to verify that with qpid-stat -q.

Assuming you didn't change your code, that would suggest a bug in the JMS client in handling the addressing. It is not passing the exclusive flag through as desired.

I'll have a test to see whether that has been fixed on trunk (I can't find any obvious JIRA).

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to