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

CommitFailedException message is misleading and cause is swallowed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 0.11.0.0
    • None
    • clients
    • None

    Description

      CommitFailedException's message suggests that it can only be thrown as consequence of rebalancing. JavaDoc of the CommitFailedException suggests differently that in general it can be thrown for any kind of unrecoverable failure from KafkaConsumer#commitSync() call (e.g. if offset being committed is invalid / outside of range).

      CommitFailedException's message is misleading in a way that one can just see the message in logs, and without consulting JavaDoc or source code one can assume that message is correct and that rebalancing is the only potential cause, so one can wast time proceeding with the debugging in wrong direction.

      Additionally, since CommitFailedException can be thrown for different reasons, cause should not be swallowed. This makes impossible to handle each potential cause in a specific way. If the cause is another exception please pass it as cause, or construct appropriate exception hierarchy with specific exception for every failure cause and make CommitFailedException abstract.

      Attachments

        Issue Links

          Activity

            People

              rekhajoshm Rekha Joshi
              sslavic Stevo Slavić
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: