Ahhh ... This might be it.
According to the release notes for 2005Q4 3.5 :
Message Queue QueueBrowser shows uncommitted messages too (Bug ID 6264003)
When browsing the contents of a queue, messages that were producted in a transaction but are not yet committed may appear in the QueueBrowser enumeration.
Interestingly, "imqcmd list dst" shows the following for the DMQ and for some other auto-created queues:
[root@mq]# bin/imqcmd list dst -t q -u admin
Listing all the queue destinations on the broker specified by:
-
Host Primary Port
-
localhost7676
NameTypeStateProducersConsumers Msgs
Active Backup Count UnAck Avg Size
<...snip...>
OptusP1GMIGMTDeliveryReceiptsQueue RUNNING 8 160661769.6666
mq.sys.dmq Queue RUNNING 0 6609419412775.9585
What does unacked messages mean in here ?
Unacked by producer or consumer ?
If unacked by producer, how can the DMQ have unacked messages ... since you cannot really produce messages directly to the DMQ ?
So these unacked messages must be unacked by consumers.
I tried replicating these unacked messages on an auto-created queue.
My consumers are transacted.
I tried receiving a message without committing ... by killing the JVM ( doing a System.exit(0) ) before commit is called.
Doing a "imqcmd list dst" does not show unacked messages.
Well ... it could not have been an uncommitted consumer transaction.
Because if I query the destination, there are no messages "held in transaction":
Destination NameDestination Type
mq.sys.dmq Queue
On the broker specified by:
-
Host Primary Port
-
localhost7676
Destination Name mq.sys.dmq
Destination Type Queue
Destination State RUNNING
Created Administratively false
Current Number of Messages
Actual941
Held in Transaction0
Current Message Bytes
Actual2612177
Held in Transaction0
Current Number of Producers0
Current Number of Active Consumers66
Current Number of Backup Consumers0
Max Number of Messagesunlimited (-1)
Max Total Message Bytes10485760
Max Bytes per Messageunlimited (-1)
Max Number of Producers0
Max Number of Active Consumersunlimited (-1)
Max Number of Backup Consumers0
Limit BehaviorREMOVE_OLDEST
Consumer Flow Limit1000
Is Local Destinationtrue
Local Delivery is Preferredfalse
Use Dead Message Queuefalse
Successfully queried the destination.
So it must be unacked by a producer, or unacked by the broker itself when transferring / moving messages to the DMQ.
Or ... it could be unacked messages from another broker, since I am having lots of these "Waiting for MESSAGE_ACK_REPLY" on the brokers.