Open erezhen opened 1 year ago
You can manually seek the consumer to an offset and start polling from there.
and then i receive all the messages from the offset to the end...
As long as you don't pause/close the consumer, yes.
pause is not enough. i need to disconnect, and reconnect the next time.
That'll work too. Offsets are stored in Kafka consumer groups. You won't lose positioning
i know, but a reconnection takes ~3 seconds. i want an open, connected consumer that will be ready to go and read a single message by an offset.
I don't have any suggestions to reduce connection time. As mentioned, you can seek and immediately close a consumer to read one offset. That's how any Kafka client works, and is not specific to this library... You could try comparing connection times with kcat
command, for example
Hi all is there a way to get a specific message by an offset?