You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by fadams <fr...@blueyonder.co.uk> on 2011/07/11 20:40:15 UTC

QPID: timed auto-delete on queues is this implemented?

I notice when I Googled auto-delete a thread in the archive on timed
auto-delete (see below).

Did this ever make it into a broker - if so what version?

Also if so what's the syntax I'd need to use in the x-declare block of an
address to use this.

Does the time start when the last connection associated with the queue
disconnects or some other interval.

I'd actually quite like to allow for a longish period (say four or five
days). In my scenario I might have a client go down over a long weekend and
I want the queue to stick around receiving messages (circular queue just in
case :-) when the client gets fixed after the support guys come in, the idea
is that it can then reconnect and clear the backlog on the queue.

On the other hand it would be nice to reap queues that really are just
hanging around....

could easily do this using QMF to work out queues without associated
connections, but if I don't have to write code to handle this it would be
neat.

Cheers,
Frase



QPID: timed auto-delete on queues

Gordon Sim
Mon, 17 Jan 2011 05:16:50 -0800

# Timed auto-deletion for queues

## Status

Draft

## Summary

Allow auto-deleted queues to have a configurable delay before they are
actually deleted.

## Problem

Applications often need to dynamically create queues (e.g. reply
queues or subscription queues for pub-sub). Cleaning up these queues
when unused is important. Though applications could delete them, it is
safest to allow the broker to do so in the event of application
failure for example. However, it is also often desirable that the
broker does not immediately delete queues when they become eligible
for deletion (based on the AMQP defined rules for auto-delete). By
allowing a configurable delay, applications can failover -
i.e. reconnect if their connection is lost - and resume their use of a
particular queue. However if they do not do so within the configured
time, the broker can still protect itself and clean the queue up.


--
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/QPID-timed-auto-delete-on-queues-is-this-implemented-tp6572125p6572125.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPID: timed auto-delete on queues is this implemented?

Posted by Gordon Sim <gs...@redhat.com>.
On 07/11/2011 07:40 PM, fadams wrote:
> I notice when I Googled auto-delete a thread in the archive on timed
> auto-delete (see below).
>
> Did this ever make it into a broker - if so what version?

Yes, it is in 0.10

> Also if so what's the syntax I'd need to use in the x-declare block of an
> address to use this.

To create a 'shared' queue on-demand:

my-queue; {create: always, node:{x-declare:{auto-delete:True, 
arguments:{'qpid.auto_delete_timeout':120}}}}

To create a subscription queue with the same properties:

my-exchange; {link:{name:my-subscription, x-declare:{auto-delete:True, 
arguments:{'qpid.auto_delete_timeout':120}}}}

The value is in seconds.

> Does the time start when the last connection associated with the queue
> disconnects or some other interval.

Yes, it starts when the queue would normally be auto-deleted. That 
depends on whether the queue is exclusive (in which case it is at the 
point where the declaring session ends) or not (in which case it is when 
the last subscriber unsubscribes.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org