artemiscloud / activemq-artemis-operator

Apache License 2.0
68 stars 63 forks source link

addresses are not deleted when autoDeleteAddresses is true #937

Closed AlexW00 closed 5 months ago

AlexW00 commented 5 months ago

Describe the bug

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

# ...
  addressSettings:
    addressSetting:
      - match: '/tmp/#'
        expiryDelay: 300000
        autoDeleteAddresses: true
        autoDeleteAddressesDelay: 30000
        autoDeleteQueues: true
        autoDeleteCreatedQueues: true
        autoDeleteQueuesDelay: 30000
        autoDeleteQueuesMessageCount: -1
# ...

it

Further information:

I use the broker as a relay for STOMP websocket messaging (spring boot) and define an acceptor like this:

  acceptors:
    - name: stomp
      port: 61613
      protocols: all

I also verified, that the addresses had queues / consumers / messages at least once.

When setting the artemis version (in broker yaml) to version: 2.26.0, it correctly deletes the queues as well as addresses.

Version info:

[!TIP] Vote this issue reacting with :+1: or :-1:

AlexW00 commented 5 months ago

After further investigation, I found out that setting the version field in the broker.yaml file to artemis version 2.27.1 works (correctly deletes expired addresses). However, since version 2.28.0 it stopped working.

AlexW00 commented 5 months ago

I think this change in version 2.28.0 is the problem: https://github.com/apache/activemq-artemis/pull/4325/files, which changed the auto deletion so that an address only gets auto deleted if it is marked as temporary

AlexW00 commented 5 months ago

Since this is not directly related to artemiscloud, I have emailed users@activemq.apache.org detailing the problem.

brusdev commented 5 months ago

@AlexW00 thanks for sharing your findings