We're running ActiveMQ 5.15.3 within a docker container and I have just switched over to using mysql as the persistence store. The problem I am having is retrieving JMXQueueStatistics when performing a query. I have messages sitting in the queue which are ready for consumption but when I perform a query and expect to retrieve results I am getting an empty set.
MBeanServerConnection activeMQConnection = activeMQJMXManager.getActiveMQJMXConnection(); Set<ObjectName> instanceObjectNameSet = activeMQConnection.queryNames(objectNameRequest, filterQueryExpr); The objectNameRequest contains the following: *org.apache.activemq:type=Broker,destinationType=Queue,destinationName=instance_*.xxxxx.CacheEvictionJobQueue* And the filterQueryExpr contains the following: *(QueueSize) > (0)* This results in an empty set being returned when I would expect 2 records retrieved. The data contained within the ACTIVEMQ_MSGS tables is as follows: <http://activemq.2283324.n4.nabble.com/file/t379719/ACTIVEMQ_MSGS-CacheEvictionJobQueue.png> I've enabled trace logging but I don't see anything obvious as to why these rows are not returned from my query. There are a few lines making reference to CacheEvictionJobQueue but I'm uncertain if they indicate a cause as to why the rows are not returned: 2020-01-14 18:04:15,546 | DEBUG | queue://instance_1000019.CacheEvictionJobQueue expiring messages .. | org.apache.activemq.broker.region.Queue | ActiveMQ Broker[my.broker] Scheduler 2020-01-14 18:04:15,546 | TRACE | max 400, alreadyPagedIn 2, messagesCount 2, memoryUsage 0% | org.apache.activemq.broker.region.Queue | ActiveMQ Broker[my.broker] Scheduler 2020-01-14 18:04:15,546 | DEBUG | queue://instance_1000019.CacheEvictionJobQueue expiring messages done. | org.apache.activemq.broker.region.Queue | ActiveMQ Broker[my.broker] Scheduler 2020-01-14 18:04:15,546 | TRACE | Running task iteration 0 - queue://instance_1000019.CacheEvictionJobQueue, subscriptions=0, memory=0%, size=2, pending=0 | org.apache.activemq.thread. PooledTaskRunner | ActiveMQ BrokerService[my.broker] Task-4 2020-01-14 18:04:15,546 | DEBUG | queue://instance_1000019.CacheEvictionJobQueue, subscriptions=0, memory=0%, size=2, pending=0 toPageIn: 0, force:false, Inflight: 0, pagedInMessages.size 2, pagedInPendingDispatch.size 2, enqueueCount: 0, dequeueCount: 0, memUsage:5612, maxPageSize:200 | org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[my.broker] Task-4 2020-01-14 18:04:15,546 | TRACE | Run task done: queue://instance_1000019.CacheEvictionJobQueue, subscriptions=0, memory=0%, size=2, pending=0 | org.apache.activemq.thread.PooledTaskRunner | ActiveMQ BrokerService[my.broker] Task-4 Thank you for your assistance. -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
