On 15/02/18 20:40, Michael Ivanov wrote:
Greetings!

I have a problem with autodeleted queues. I have a service that reads amqp 
messages
and sends replies using reply_to value. Client that sends the message generates
temporary queue to use for replies using "/#" syntax. Client sends the message,
waits for reply and terminates. But temporary queue, created by client, still 
remains
in the broker until the other end (my service) is restarted.

Here's how this queue is shown by qpid-stat after client has terminated:

  queue                  dur  autoDel  excl  msg   msgIn  msgOut  bytes  
bytesIn  bytesOut  cons bind
   
===================================================================================================
   821 .... 857-349.0         Y                 0     1      1       0    257   
   257         0    1

Queue is marked as auto delete, number of connections is 0, but bind is 1. I 
guess
this is the reason why it is not deleted.

Is there a way to request messenger to unbind the queue as soon as the message 
is sent?

I am using pn_messenger_* interface of proton library.

I believe the problem is that there is still a sending link to the queue(s). (This doesn't show up in the qpid-stat output because it was defined for older iterations of AMQP where there was no such concept).

If the queue is both auto-delete and exclusive, it is deleted when the link that caused it to be created is closed. If it is auto-delete only, it is deleted when it is 'no longer used', which is currently interpreted by qpidd to being when there are no links to it in either direction. In AMQP 1.0 this can also be controlled through the 'lifetime-policy' property in the dynamic-node-properties field.

Unfortunately the messenger API gives you no control over the type of queue you request, nor (I think) does it allow you to close senders (which may in itself be a problem) or use an anonymous sender.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to