Hello Everyone,
We're working on a java application that uses EMA to connect to RTDS/ADS through a custom plugin developed by our team.
Our customer has requested a specific behavior:
if both ADS endpoints configured in the failover channel list are unavailable (i.e., a total outage), the application should stop instead of staying in EMA’s native retry loop.
Before implementing a custom logic, I would like to better understand the expected behavior of EMA in this scenario and check if a recommended approach already exists.
Our understanding is that:
-EMA internally manages all failover and retry behavior
-the retry loop continues indefinitely if no ADS endpoints are reachable
-this is the expected default behavior when using ChannelSet and reconnect parameters in the EmaConfig
However, our client requires that the application:
-terminates when all ADS endpoints fail
-returns a specific exit code/writes an identifying log entry
-optionally allows this via a configuration property (e.g. onTotalOutage.mode = retry | stop)
Questions:
- Which callbacks or state events are most appropriate to detect a “total outage”?
For example:
ChannelDown
ChannelDownReconnecting
ConnectionLost
lack of available channels in the Reactor/Consumer
- Is there an officially recommended way to interpret these events?
- Is there any supported configuration or API feature to disable retry?
Or should this requirement always be implemented at application level, by intercepting EMA events and explicitly shutting down the consumer?
- Is there any known best practice for applications that must exit on loss of all ADS endpoints?
We would like to follow the most aligned solution from an EMA perspective.
Before proceeding, we would appreciate guidance or confirmation on how EMA is expected to handle this case.
Any insights or suggestions would be greatly appreciated.
Thanks in advance to the EMA team and the community!
Ale