You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Deng Ziming (Jira)" <ji...@apache.org> on 2023/02/28 05:15:00 UTC

[jira] [Commented] (KAFKA-14764) Metadata API ignores topic names if at least one topic ID is provided

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

Deng Ziming commented on KAFKA-14764:
-------------------------------------

[~dajac] Yes, this rule was described here: [https://cwiki.apache.org/confluence/display/KAFKA/KIP-516%3A+Topic+Identifiers#KIP516:TopicIdentifiers-MetadataRequestv10] 
{quote}Topic name will be left in to allow requests to be made either by topic name or topic ID. Requests should only use one or the other.

ID will be checked first, but if the value is the default zero UUID, topic name will be used instead. 
{quote}
This was designed intentionally, do you think we should make some adjustment, for example, to return an error when receiving a mixed request?

> Metadata API ignores topic names if at least one topic ID is provided
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-14764
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14764
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: David Jacot
>            Priority: Major
>
> The Metadata API accepts both topic names and topic ids in the request. This suggests that a single request could mix them in. At least, we have no logic on the server side to prevent this. The issue is that the server just ignores any topic specified with a name if there is at least one topic specified with an id in the request. In other words, if a request contains topic-id-1, topic-id-2, topic-name-1 and topic-name-2, the response will only have metadata for topic-id-1 and topic-id-2.
> This does not hurt us today because the clients does not use topic ids in the request at all.



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