Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When closing a receiver for a queue that is either delete:always or auto-delete:true, it is possible for the queue to remain visible in management (qmf) even though the client has already acknowledged, released, or rejected all messages.
Steps to reproduce:
1) Create receiver e.g. my-queue; {create:always, delete:always, node: {x-declare:
{auto-delete: true}}}
2) Set capacity to something e.g. 10
3) Send messages to my-queue
4) Call get() on the receiver for each message
5) Ack/release/reject each message
6) Close the receiver
7) IMPORTANT: keep the session alive
Expected results: "qpid-stat -q" will not show my-queue in the list
Actual results: "qpid-stat -q" shows my-queue in the list
This happens because the broker has instances of DeliveryRecord in memory for each message that the receiver acquired, and each DeliveryRecord has a shared_ptr to the Queue. Because the receiver does not necessarily send completions for all the message.transfer commands, DeliveryRecords will still be around, which means the Queue will still be visible via management.