Nelson B. created KAFKA-17404:
---------------------------------
Summary: Return the actual controller id or -1 instead of a random
broker id when calling DescribeCluster or TopicMetadata APIs. .
Key: KAFKA-17404
URL: https://issues.apache.org/jira/browse/KAFKA-17404
Project: Kafka
Issue Type: Improvement
Reporter: Nelson B.
Currently, when the `DescribeCluster` API with `EntityType=1` or the
`TopicMetadata` API is called, the controller ID value in the response is set
to a random broker ID. I'm not sure but I think this approach was used because,
before KIP-919, clients couldn't communicate directly with the controller and
had to route through a broker. Therefore, the specific broker used to reach the
controller didn't matter. However, after KIP-919, it would be more appropriate
to return the actual controller ID if the node also serves as a broker.
Otherwise, return -1.
**Summary:**
**AS-IS:**
- `DescribeCluster` with `EntityType=1` or `TopicMetadata` request ->
controller ID is set to a random broker ID.
**TO-BE:**
- `DescribeCluster` with `EntityType=1` or `TopicMetadata` request ->
controller ID is set to the actual controller ID if it also serves as a broker;
otherwise, return -1.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)