You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a way to work around to see if it fits your need. Here is how we did it to read from any offset:
Get the first and last offsets on a topic/partition:
...
conn, err = dialer.DialLeader(ctx, "tcp", broker, k.Topic, k.Partition) // we use kafka.DefaultDialer
if err != nil {
// should retry, or another broker
}
first, last, err = conn.ReadOffsets()
...
use the above offsets to set your desired starting offset k.Offset between first and last (inclusive):
Describe the solution you would like
Currently the implementation when spinning a consumer without consumer group will always start at the first offset:
kafka-go/reader.go
Line 707 in a558bb8
Would it be possible to support the
StartOffset
parameter instead?The goal in here is to spin a consumer without a consumer group idea to get only the latest offsets
The text was updated successfully, but these errors were encountered: