We need to switch between hosts in case of unavailability. To do this, we recreate OmmConsumer with new settings (only one OmmConsumer exists at a time). If all hosts are unavailable, the memory leaks out exponentially during 30 attempts, which leads to the process crash. It is empirically established that the memory leak occurs as a result of repeated calls to the OmmConsumer constructor. Advise how to avoid this problem?
I am not aware of memory leak as you describe - please raise a Premium Support Ticket if you wish to investigate in more detail offline.
Before you do that, I just wanted to check if you aware of the ChannelSet functionality of EMA?
The use of ChannelSets allows you to specify a comma-separated list of channels names. Each Channel definition can point to a different host. Channels in the set will be tried by EMA with each reconnection attempt until a successful connection is made.
When I'm following your Premium Support Ticket link I'm getting
Something Went Wrong We were unable to retrieve the page you were trying to reach. We don't want to leave you hanging though. Go back or see other APIs you may be interested in...
I do experience the memory leak as well.
Due to some reasons (not important why) I need to dispose (uninitialize) the OmmConsumer and create a new instance of OmmConsumer. However after roughly 27 iterations (destroy OmmConsumer and create new one) the process consumes 16 GB of memory and crashes. Worth mentioning that this happens even if no clients are registered.
The ChannelSet feature is not what I am looking for and it won't help me.
This issue has been reported on GitHub
JIRA ID: ESDK-3495
Based on the latest post from the issue, the development team is working on this issue, and it will be fixed in the next release.
You can change EMA default behavior to log the EMA messages to Stdout as the workaround. We can put EmaConfig.xml to a running directory and then change LoggerType in configuration file to Stdout instead.
DefaultConsumer in the XML file is Consumer_1 and it use Logger_1 therefore we need to change LoggerType in Logger_1 section to LoggerType::Stdout.
<LoggerSeverity value="LoggerSeverity:: NoLogMsg"/>