qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaston Quezada <quezada.gas...@gmail.com>
Subject Re: Auto deleting a queue after timeout with Java qpid broker
Date Sun, 01 Apr 2012 19:25:03 GMT
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 <eugene.prystupa@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message