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):
Activity
ns-gzhang commentedon Feb 21, 2025
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:
k.Offset
betweenfirst
andlast
(inclusive):petedannemann commentedon Mar 21, 2025
Yeah this seems reasonable and was probably a mistake in the initial implementation, can you submit a PR with the change?
zekth commentedon Mar 21, 2025
I'll try to find an implementation to avoid breaking changes in the initial behavior.