I have a working Elixir app consuming messages from my Kafka broker, it was really easy thanks to the excellent KafkaEx package.
The question I have revolves around reading from different offsets on a partition.
My GenConsumer is implemented like here https://hexdocs.pm/kafka_ex/KafkaEx.html#module-consumer-groups always reads the latest unread from the last committed offset, which is fine.
- While its reading the messages, it would be nice to know the offset position it is at, for performance monitoring, but the state is nil as its up to us to set.
- If I wanted to read from a given offset, I guess the
KafkaEx.GenConsumeris no good for this? I would have to implement my own