I make a service which reads a recording from Aeron Archive and sends this data to Kafka. The recordings operate with position: they have startPostion/stopPosition. When you replay the data you need to specify the position, etc. If the Archive consumer restarts, then it wants to continue processing from the point where it stopped last time. How should it be implemented? There are two subquestions here:
-
When I receive a fragment in a
FragmentHandler
, how do I figure out which position does it have in the recoding? TheSubscription
/FragmentHandler
API is implemented for the basic Aeron which have no information about the Archive. -
More generally, how should consumers track their offsets? Kafka provides this functionality: when a consumer from a given consumer group connects to Kafka, it can start reading from where it stopped last time without storing the consumer offset on a client side. Does Aeron Archive have anything like this? What is the expected way of tacking offsets?