Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6427

Inconsistent exception type from KafkaConsumer.position

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 2.0.0
    • consumer
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jkahrman Jay Kahrman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: