I’ve been doing some testing around application restarts and memory usage and noticed what appears to be lingering DataDictionaryImpl objects after shutting down the EMA consumer.
In our test, we repeatedly stopped and restarted our application 6 times in a row. After the restarts, a heap inspection shows multiple DataDictionaryImpl instances still present in memory. It looks like these objects are not being cleaned up when the consumer is shut down.
For reference:
API: EMA Java
Version: 3.9.1.1
JVM: OpenJDK Runtime Environment (Red_Hat-17.0.18.0.8-1) (build 17.0.18+8-LTS)
The shutdown code simply calls:
OmmConsumer.uninitialize();
Based on the API documentation, I expected this to fully tear down the consumer and release associated resources, including dictionary-related objects.
However, after multiple restart cycles in the same JVM, I can see multiple DataDictionaryImpl objects remaining in memory.
My questions:
Is OmmConsumer#uninitialize() expected to fully clean up dictionary objects such as DataDictionaryImpl?
Is there an additional shutdown step required to completely tear down the EMA API?
Could this be related to dictionary loading/caching behaviour inside EMA?
Any guidance would be appreciated.