[ 
https://issues.apache.org/jira/browse/KAFKA-20537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101077#comment-18101077
 ] 

Yunseop Eom commented on KAFKA-20537:
-------------------------------------

PR opened: https://github.com/apache/kafka/pull/22945

Implemented existing topic ID propagation in CreateTopicsResponse and exposed 
it through CreateTopicsResult.topicId(topic), while preserving 
TopicExistsException behavior for values()/all() and older-response 
compatibility.

Validation: KafkaAdminClientTest (291 tests), ReplicationControlManagerTest (75 
tests), and affected-module Checkstyle/SpotBugs passed.

Status: PR open and awaiting review.

> Return topic-id in CreateTopicsResponse when topic already exists
> -----------------------------------------------------------------
>
>                 Key: KAFKA-20537
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20537
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Jonah Hooper
>            Priority: Minor
>
> If a topic already exists in the CREATE_TOPICS request then we return 
> [TOPIC_ALREADY_EXISTS|https://github.com/apache/kafka/blob/3c9b210be3436c0b2086f779ce56db2377ee338e/clients/src/main/java/org/apache/kafka/common/protocol/Errors.java#L256]
>  error code. Under this error case the topicId will not be set. Since the 
> [topicId|https://github.com/apache/kafka/blob/3c9b210be3436c0b2086f779ce56db2377ee338e/clients/src/main/resources/common/message/CreateTopicsResponse.json#L46]
>  does exist if the topic was already created, we should return it as part of 
> the RPC. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to