Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8179 Incremental Rebalance Protocol for Kafka Consumer
  3. KAFKA-4600

Consumer proceeds on when ConsumerRebalanceListener fails

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.1.1
    • 2.4.0
    • consumer, streams
    • None

    Description

      One of the use cases for a ConsumerRebalanceListener is to load state necessary for processing a partition when it is assigned. However, when ConsumerRebalanceListener.onPartitionsAssigned() fails for some reason (i.e. the state isn't loaded), the error is logged and the consumer proceeds on as if nothing happened, happily consuming messages from the new partition. When the state is relied upon for correct processing, this can be very bad, e.g. data loss can occur.

      It would be better if the error was propagated up so it could be dealt with normally. At the very least the assignment should fail so the consumer doesn't see any messages from the new partitions, and the rebalance can be reattempted.

      Attachments

        Issue Links

          Activity

            People

              guozhang Guozhang Wang
              braedon Braedon Vickers
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: