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

Manikumar resolved KAFKA-6427.
------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

Fixed in https://github.com/apache/kafka/pull/5005

> 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
>             Fix For: 2.0.0
>
>
> 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
(v7.6.3#76005)

Reply via email to