Mickael Maison created KAFKA-16865:
--------------------------------------
Summary: Admin.describeTopics behavior change after KIP-966
Key: KAFKA-16865
URL: https://issues.apache.org/jira/browse/KAFKA-16865
Project: Kafka
Issue Type: Task
Components: admin, clients
Reporter: Mickael Maison
Running the following code produces different behavior between ZooKeeper and
KRaft:
{code:java}
DescribeTopicsOptions options = new
DescribeTopicsOptions().includeAuthorizedOperations(false);
TopicCollection topics =
TopicCollection.ofTopicNames(Collections.singletonList(topic));
DescribeTopicsResult describeTopicsResult = admin.describeTopics(topics,
options);
TopicDescription topicDescription =
describeTopicsResult.topicNameValues().get(topic).get();
System.out.println(topicDescription.authorizedOperations());
{code}
With ZooKeeper this print null, and with KRaft it prints [ALTER, READ, DELETE,
ALTER_CONFIGS, CREATE, DESCRIBE_CONFIGS, WRITE, DESCRIBE].
The Admin.getTopicDescriptionFromDescribeTopicsResponseTopic does not take into
account the options provided to describeTopics() and always populates the
authorizedOperations field.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)