Lianet Magrans created KAFKA-16764:
--------------------------------------

             Summary: 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


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 message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to