You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Lianet Magrans (Jira)" <ji...@apache.org> on 2024/05/17 19:26:00 UTC

[jira] [Assigned] (KAFKA-16764) New consumer should throw InvalidTopicException on poll when invalid topic in metadata

     [ https://issues.apache.org/jira/browse/KAFKA-16764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lianet Magrans reassigned KAFKA-16764:
--------------------------------------

    Assignee: appchemist

> New consumer should throw InvalidTopicException on poll when invalid topic in metadata
> --------------------------------------------------------------------------------------
>
>                 Key: KAFKA-16764
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16764
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 3.7.0
>            Reporter: Lianet Magrans
>            Assignee: appchemist
>            Priority: Blocker
>              Labels: kip-848-client-support
>             Fix For: 3.8.0
>
>
> A call to consumer.poll should throw InvalidTopicException if an invalid topic is discovered in metadata. This can be easily reproduced by calling subscribe("invalid topic") and then poll, for example.The new consumer does not throw the expected InvalidTopicException like the LegacyKafkaConsumer does. 
> The legacy consumer achieves this by checking for metadata exceptions on every iteration of the ConsumerNetworkClient (see [here|https://github.com/apache/kafka/blob/0e023e1f736ea03568032cc282803df8e61eb451/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java#L315])
> This is probably what makes that [testSubscriptionOnInvalidTopic|https://github.com/apache/kafka/blob/0e023e1f736ea03568032cc282803df8e61eb451/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java#L2956] fails for the new consumer. Once this bug is fixed, we should be able to enable that test for the new consumer.



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