We have JMS application which is using ActiveMQ. There are features which use ActiveMQ advisory messages (e.g. we are interested in count of consumers in a queue, etc).
We are testing the application with ActiveMQ Artemis 2.24.0, and we found that we are not receiving any advisory messages.
We read documentation, and we use OpenWire protocol with supportAdvisory=true and suppressInternalManagementObjects=false. We see advisory queues and addresses in the admin UI. We see that consumers are there, but we are receiving no advisories at all.
Admin UI says that count of messages in advisory queues is zero so we understand it that Artemis is not sending them. When we send a message to the advisory queue, it is propagated to clients so clients/consumers are bound correctly.
We use spring boot framework. There is sample code we use:
@JmsListener(destination = "ActiveMQ.Advisory.Consumer.Topic.Application", containerFactory = "jmsFactory")
public void checkIfBecomeMaster(Message message) {
try {
consumerCount = Integer.valueOf(message.getStringProperty("consumerCount"));
// More code there...
} catch (JMSException e) {
e.printStackTrace();
}
}
What we are missing? Is there any plugin required or any additional tool?
We know that there are many other ways how to query Artemis for same values, but we would like to migrate the application as it is.