-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kgo: add TopicID to the FetchTopic type #794
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1041,6 +1041,7 @@ func (s *source) handleReqResp(br *broker, req *fetchRequest, resp *kmsg.FetchRe | |
|
||
fetchTopic := FetchTopic{ | ||
Topic: topic, | ||
TopicID: rt.TopicID, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, so if version >= 13, I should be assured that this is set? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's set if the broker returns it -- it's a new field in fetch response v13, yes -- and this will be all 0s if it is unset. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha, I assume all 0s is an invalid topic id. |
||
Partitions: make([]FetchPartition, 0, len(rt.Partitions)), | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe add fetch request version? Will make it easier for someone using the API, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End users generally don't actually know what version of Kafka introduced what version of a request. It's undocumented anywhere -- a person has to first know the version a field was introduced in, then figure out which KIP introduced that version, then figure out which version of Kafka the KIP was actually released in.
Mentioning the version of Kafka that introduced topic IDs in the fetch response circumvents that process and gets directly to the answer, IMO.