You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Eugene Prystupa <eu...@gmail.com> on 2012/04/01 15:49:57 UTC

Auto deleting a queue after timeout with Java qpid broker

Is it possible to configure the queue to be deleted if no consumers are
bound to it for a configured period of time? Similar to how "x-expire"
option works in RabbitMQ (http://www.rabbitmq.com/extensions.html). I'm
looking to do this with Java qpid broker.

-- 
Thanks,
Eugene

Re: Auto deleting a queue after timeout with Java qpid broker

Posted by Gaston Quezada <qu...@gmail.com>.
Dear Eugene,
I use it as folows in Java:

  String address = queueName + "; {create: always, node:{durable:" + new
Boolean(SWProperties.getString("queue.durable", System.getProperty(type +
"sw.properties"))).booleanValue() +
                                                                  ",
exclusive:" + new Boolean(SWProperties.getString("queue.exclusive",
System.getProperty(type + "sw.properties"))).booleanValue() +
                                                                  ",
x-declare:{queue:'" + queueName + "',auto-delete:" + new
Boolean(SWProperties.getString("queue.auto.delete", System.getProperty(type
+ "sw.properties"))).
booleanValue() + ", arguments:{'qpid.auto_delete_timeout':" +
SWProperties.getInt("queue.expired.time", System.getProperty(type +
"sw.properties")) + "}}," +
                                                                   "
x-bindings:[{exchange:'" + exchangeName + "', key:'" + routingkeyName +
"'}]}}";

 AMQDestination queue = new AMQAnyDestination(address);


WHERE:

queue.durable= true or false
queue.exclusive= true or false
queue.auto.delete= true or false
queue.expired.time= time in seconds format (example: 30)

Gastón


2012/4/1 Eugene Prystupa <eu...@gmail.com>

> Is it possible to configure the queue to be deleted if no consumers are
> bound to it for a configured period of time? Similar to how "x-expire"
> option works in RabbitMQ (http://www.rabbitmq.com/extensions.html). I'm
> looking to do this with Java qpid broker.
>
> --
> Thanks,
> Eugene
>



-- 
Gastón Quezada
http://dooid.me/quezadagaston

Re: Auto deleting a queue after timeout with Java qpid broker

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Eugene,

For the Java broker we currently only support queue deletion following
disconnect of the last consumer on auto-delete queues. The feature
Gaston has described in his post is one currently only offered by the
C++ broker, which serves to defer the deletion auto-delete queues for
a given time period to allow them to be reused by a new consumer.

Robbie

On 1 April 2012 14:49, Eugene Prystupa <eu...@gmail.com> wrote:
> Is it possible to configure the queue to be deleted if no consumers are
> bound to it for a configured period of time? Similar to how "x-expire"
> option works in RabbitMQ (http://www.rabbitmq.com/extensions.html). I'm
> looking to do this with Java qpid broker.
>
> --
> Thanks,
> Eugene

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