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

KafkaConsumer.close throws authorization exception even when commit offsets is empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0
    • unit tests
    • None

    Description

      When offsets is empty and coordinator is unknown, KafkaConsumer.close doesn't throw exception before commit https://github.com/apache/kafka/commit/4b468a9d81f7380f7197a2a6b859c1b4dca84bd9.  After this commit, Kafka.close may throw authorization exception.

       

      Root cause is because in the commit, the logic is changed to call lookupCoordinator even if offsets is empty. 

       

      Even if a consumer doesn't have access to a group or a topic, it might be better to not throw authorization exception in this case because close() call doesn't touch actually access any resource.

      Attachments

        Issue Links

          Activity

            People

              vincent81jiang Vincent Jiang
              vincent81jiang Vincent Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: