Clear references for objects within Disruptor after usage.
Approach
Last event handler of the Disruptor clears all the object reference from the Disruptor event container objects. In outbound and inbound disruptor we have missed clearing some newly introduced objects, With this fix, we are clearing those objects as well from the Disruptor buffer with the last event handler.
User stories
User publishes and consumes message from the broker. Once the messages get consumed references to delivered messages and already closed channels should be GC'ed
Release note
Clear references for objects within Disruptor after usage.
Documentation
No documentation change needed
Training
No training document change needed
Certification
N/A - Functionality of the broker is not affected
Marketing
Not a feature, Fix for a bug
Automation tests
Unit tests
Not added
Integration tests
Need to manually test a heap dump to identify this. Since this is a probable OOM scenario.
Ran FindSecurityBugs plugin and verified report? yes
Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes
Samples
Provide high-level details about the samples related to this feature
Related PRs
None
Migrations (if applicable)
N/A
Test environment
This can be reproduced with any JDK, OS and DB
Learning
This issue can be identified by taking a heap dump after publishing and consuming the message from the broker and checking for references of ProtocolMessage, AndesChannel, LocalSubscription objects from Disruptor.
Purpose
References to Objects in Disruptor are not cleared properly after using. This fix clears the references after usage within Disruptor
Issue
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning