-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Allow describe/alter config for broker configs #649
Comments
I suggest splitting this into two efforts. The first one seems like a straight up bug that I would be happy to review a PR for. The second one I'm not sure what the best solution for is. Given that it's a bug, perhaps a technically breaking change is okay. My priority would be to reduce the impact on existing Typescript users. My suggestion would be to:
When the time comes that we need the equivalent of |
Replaced by AclResourceTypes and ConfigResourceTypes. See #649
Currently the
describeConfigs
andalterConfigs
methods on admin client fails for broker configs when the cluster has more than one broker. Config requests for topic resources can be served by any broker, but broker config requests must be served by the specific broker.Example test that will break (unless you are lucky and the request actually goes to the broker being requested):
Change
describeConfigs
andalterConfigs
to split requests up and send any requests for resource type broker to the specific broker. The Java client does this as well [0].Current config related methods on admin client uses
RESOURCE_TYPE
[1] to facilitate requests. Unfortunately this does not represents configs correctly. The linked resource type in Java is ACL related, not for configs. The correct resource type values for configs are available in: https://github.com/apache/kafka/blob/a99e0111114d1cb8c762494ac195cf84e6425bb3/clients/src/main/java/org/apache/kafka/common/config/ConfigResource.java#L36. In the above code example, I would have expected something likeRESOURCE_TYPES.BROKER
as type value.Possible solutions would be to either rework the current resource type object to match that of ConfigResource, or create a new ConfigResourceType module and use that for all config related methods. This is potentially a breaking change in both cases, especially for Typescript users, as a different type is introduced. Alternatively, keep RESOURCE_TYPE and accept the deviation from the Java client.
I am happy to make the necessary changes for this to work, especially the first part to get the feature working, but input on handling the second point would be good. My preference is to introduce the new ConfigResourceType module, and keep the existing resource type for any future functionality where it is needed.
[0] https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java#L1891
[1] https://github.com/tulios/kafkajs/blob/master/src/protocol/resourceTypes.js
The text was updated successfully, but these errors were encountered: