I discovered MBeans recently and just checked out the ActiveMQ Artemis MBeans. Inside the queue attributes we see that there are some messages since the MessageCount
is > 0.
But when I call the listMessages/AsJSON method the returned String
is always empty:
Is there maybe I config I have missed? Other operations like listMessageCounter
are working fine.
The issue is that the messages are "in delivery" which means that they will not be returned by the listMessages
or listMessagesAsJSON
methods. Notice that DeliveringCount
is 16
(i.e. the same as Message Count
). Messages which are in delivery are those messages which have been dispatched from the broker to a client but the client has not yet acknowledged.
Try using listDeliveringMessages
or listDeliveringMessagesAsJSON
instead.