Hello, my use case could be not so common.
In my deployment I have an hash subscriber (connected through AMQP protocol on
connector A) to execute business logic and clients that connect to the broker
through MQTT (on connector B) and publish/subscribe to various topics.
If the client unsubscribe topics (or disconnect) the broker removes the non
durable queues associated to the subscriptions but left the created addresses
since there is a consumer still subscribed to these addresses I suppose (the
AMQP hash subscriber).
I was looking at PostOfficeImpl code [1] since I think is the part of the
broker code involved in collecting and deleting addresses but I wasn’t able to
figure out how to customize the
QueueManagerImpl.consumerCountCheck(queue) ([2])
to avoid to consider the AMQP hash subscriber in the consumers count check.
As workaround I tried to force the address deletion once the authorize for
DELETE_NON_DURABLE_QUEUE is called (I have my custom SecurityPlugin with
authorization caching disabled (caching is handled by my plugin))
But I’m not sure is the right way to proceed.
Any suggestion?
Regards
Riccardo Modanese
[1]
https://github.com/apache/activemq-artemis/blob/2.28.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java#L1979
[2]
https://github.com/apache/activemq-artemis/blob/2.28.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java#LL1981C82-L1981C124