kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Kahrman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-6427) Inconsistent exception type from KafkaConsumer.position
Date Fri, 05 Jan 2018 17:50:00 GMT
Jay Kahrman created KAFKA-6427:
----------------------------------

             Summary: Inconsistent exception type from KafkaConsumer.position
                 Key: KAFKA-6427
                 URL: https://issues.apache.org/jira/browse/KAFKA-6427
             Project: Kafka
          Issue Type: Bug
          Components: consumer
            Reporter: Jay Kahrman
            Priority: Trivial


If KafkaConsumer.position is called with a partition that the consumer isn't assigned, it
throws an IllegalArgumentException. All other APIs throw an IllegalStateException when the
consumer tries to act on a partition that is not assigned to the consumer. 

Looking at the implementation, if it weren't for subscription test and IllegalArgumentException
thrown at the beginning of KafkaConsumer.position, the very next line would throw an IllegalStateException
anyway.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message