Document Karafka::Admin.new(external_client:), fix Configuration Scope claim - #990
Open
coipond-writer[bot] wants to merge 1 commit into
Open
Document Karafka::Admin.new(external_client:), fix Configuration Scope claim#990coipond-writer[bot] wants to merge 1 commit into
coipond-writer[bot] wants to merge 1 commit into
Conversation
…e claim
karafka/lib/karafka/admin.rb:55: def initialize(kafka: {}, external_client: nil).
external_client: is a 2.6.0 addition letting admin operations run on an
already-open client (a raw rdkafka admin instance, one wrapped with
Connection::Proxy, or a Connection::Client of a running consumer)
instead of opening a new short-lived connection. Its lifecycle stays
fully with its owner.
The "Configuration Scope" note claimed kafka: was the only customizable
per-instance argument, directly contradicting this. Fixed the note and
added a short subsection documenting external_client:, framed per the
source docstring as a low-level API.
Fixes #44801.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
`Infrastructure/Admin/API.md`'s "Configuration Scope" note said "Only the `kafka` configuration is customizable per Admin instance."
Why it's wrong
`karafka/lib/karafka/admin.rb:55`: `def initialize(kafka: {}, external_client: nil)`. `external_client:` is a 2.6.0 addition letting admin operations run on an already-open client (a raw rdkafka admin instance, one wrapped with `Connection::Proxy`, or a `Connection::Client` of a running consumer) instead of opening a new short-lived connection. Its lifecycle stays fully with its owner. This directly contradicts the "only `kafka`" claim and was undocumented anywhere on the wiki.
Fix
Corrected the note and added a short subsection documenting `external_client:`, framed per the source docstring as a low-level API.
Fixes #44801 (Redmine).