-
Bug
-
Resolution: Done
-
Major
-
JBoss A-MQ 6.3
-
-
+
-
Message that were set TTL by <to uri="jms:queue:xyz?timeToLive=1000" /> or producer.setTimeToLive(5000) in a queue will be discarded or move to DLQ if it exceed the TTL's value.
But if I used Database instead of Kahadb as persistence store, the behaviour sometime didn't work well, the message will stay in the queue forever.
Based on tests, I found the rule: if messages quickly occupied a queue's memory over 70% which is default watermark of producerFlowControl, at the meantime, producerFlowControl=true, from DEUBG log, we can see
memory=70%, size=848, pending=0 toPageIn: 200, force:false, Inflight: 0, pagedInMessages.size 0, pagedInPendingDispatch.size 0, enqueueCount: 3706, dequeueCount: 2858, memUsage:734198, maxPageSize:200
As you can see, in this case, pagedInMessages.size and pagedInPendingDispatch.size are all 0 forever, after that, expired message will stay in Database forever.
If I send message slowly, before memory reached 70%, pagedInMessages.size and pagedInPendingDispatch.size has value, in this case, expired message will be removed.
I did the same test with Kahadb, everything worked as expected, expired messages will be removed even PFC triggered.