[ 
https://issues.apache.org/jira/browse/JAMES-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476926#comment-17476926
 ] 

René Cordier commented on JAMES-3694:
-------------------------------------

https://github.com/apache/james-project/pull/841 implemented this

> Add a TTL on RabbitMQ queues
> ----------------------------
>
>                 Key: JAMES-3694
>                 URL: https://issues.apache.org/jira/browse/JAMES-3694
>             Project: James Server
>          Issue Type: Improvement
>    Affects Versions: 3.6.0
>            Reporter: René Cordier
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> In our production environments we encountered some strange phenomenons: some 
> queues marked as autodelete (like for the mailbox eventBus) are still present 
> while having no consumers with a consequent number of messages in it.
> Checking the RabbitMQ doc 
> https://www.rabbitmq.com/queues.html#temporary-queues
> ```
> An auto-delete queue will be deleted when its last consumer is cancelled 
> (e.g. using the basic.cancel in AMQP 0-9-1) or gone (closed channel or 
> connection, or lost TCP connection with the server).
> If a queue never had any consumers, for instance, when all consumption 
> happens using the basic.get method (the "pull" API), it won't be 
> automatically deleted. For such cases, use exclusive queues or queue TTL.
> ```
> Could we be sometimes after some issues in a case where that queue never had 
> any consumers? 
> For this, I propose to add a TTL to the queue 
> https://www.rabbitmq.com/ttl.html#queue-ttl. According to the doc, even if 
> there was no consumer to the queue, it will be deleted after the ttl if we 
> set this up.
> Of course it should be a configurable optional field in rabbitmq.properties 
> file. Something like this:
> ```
> notification.queue.ttl=3600000 # unit in ms
> ```
> The unit is in ms, so the default would be 3600000ms -> 1h



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to