Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.5.0
Description
With a reasonable large textmessage, the connection state tracker, which keeps an LRU cache of messages for redelivery on failover, can grow. The problem is the use of message size, which is approximated before marshaling. The approximation is > the encoded size so the size increments on a track back are larger than the decrements on a track, which lease to growth in the number of messages cached and can lead to an OOM.
The fix appears to be to not cache a copy of the message, such that the increment when the message is evicted will reflect the decrement after marshaling.
The change that exposed this issue is https://issues.apache.org/jira/browse/AMQ-2585 - without that change the state tracker capacity would shrink.