**Basic bug info**

When configuring a broker to auto-delete expired addresses like this:

```xml
<!-- broker.xml ... -->
<address-setting match="/tmp/#">
  <expiry-delay>300000</expiry-delay>
  <auto-delete-addresses>true</auto-delete-addresses> <!-- especially this -->
  <auto-delete-addresses-delay>30000</auto-delete-addresses-delay>
  <auto-delete-queues>true</auto-delete-queues>
  <auto-delete-created-queues>true</auto-delete-created-queues>
  <auto-delete-queues-delay>30000</auto-delete-queues-delay>
  <auto-delete-queues-message-count>-1</auto-delete-queues-message-count>
</address-setting>
<!-- broker.xml ... -->
```

Artemis

- correctly deletes automatically created, expired, queues
- **but does not** delete automatically created, expired, addresses (e.g. named 
'/tmp/abc/123')
  - this leads to many old, automatically created, addresses that fill up the 
broker

**Further bug info**

- I use the broker as a relay for STOMP websocket messaging (spring boot).
- I also verified, that the addresses had queues / messages / consumers at 
least once.

**Affected versions**

- any Artemis version => 2.28.0 
(https://activemq.apache.org/components/artemis/documentation/latest/versions.html#2-28-0)

Furthermore, I think I found the change, that causes this behavior:

- Version: 2.28.0 
(https://activemq.apache.org/components/artemis/documentation/latest/versions.html#2-28-0)
- Ticket: ARTEMIS-4125 (https://issues.apache.org/jira/browse/ARTEMIS-4125)
- Change: When destroying a queue, the address now only gets deleted if it (the 
address) is marked as temporary
- Code Change: 
https://github.com/apache/activemq-artemis/pull/4325/files#diff-96cdf8c4ff8d61ac9690fd5bfe2baefb4207074fc2bcd8a86d9122cb2f1ee1c2R1135

However, in the *detailed* changelog of version 2.28.0 
(https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12352523&projectId=12315920),
 the change was only mentioned as 'Address can be removed inadvertently'.

**Other notes**

If this is indeed intended behavior, how would one go about auto deleting 
addresses, whose queues have expired?

Reply via email to