I replay a recording using the Aeron Archive. How can I determine that the recording has ended? Is there a way to provide a callback which is triggered when the recording runs out of data? At the moment I use a simple heartbeat-style workaround which tracks the timestamp of the last message (measured by consumer) and if a timeout has passed I decide that there is no more data. This workaround looks unreliable: there can be many reasons why it didn’t receive data for a long time. What is the best practice of determining the end of recording?
There is a subquestion here. When I use a ReplayMerge
, how can I determine that I already replayed all historical data and now I follow the live stream?