Skip to content

Commit

Permalink
consumer: return UnknownTopicID even though it is retryable
Browse files Browse the repository at this point in the history
See the embedded comment.

Closes #357.
  • Loading branch information
twmb committed Feb 16, 2023
1 parent 23b7119 commit efe1cdb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/kgo/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,14 @@ func (s *source) handleReqResp(br *broker, req *fetchRequest, resp *kmsg.FetchRe
keep = true
}

case kerr.UnknownTopicID:
// We need to keep UnknownTopicID even though it is
// retryable, because encountering this error means
// the topic has been recreated and we will never
// consume the topic again anymore. This is an error
// worth bubbling up.
keep = true

case kerr.OffsetOutOfRange:
// If we are out of range, we reset to what we can.
// With Kafka >= 2.1, we should only get offset out
Expand Down

0 comments on commit efe1cdb

Please sign in to comment.