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

Kafka Consumer close() hangs indefinitely if Kafka Broker shutdown while connected

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0.1, 0.10.0.0
    • Fix Version/s: None
    • Component/s: clients
    • Labels:
      None
    • Environment:
      x86 Red Hat 6 (1 broker running zookeeper locally, client running on a separate server)

      Description

      I am using the KafkaConsumer java client to consume messages. My application shuts down smoothly if I am connected to a Kafka broker, or if I never succeed at connecting to a Kafka broker, but if the broker is shut down while my consumer is connected to it, consumer.close() hangs indefinitely.

      Here is how I reproduce it:

      1. Start 0.9.0.1 Kafka Broker
      2. Start consumer application and consume messages
      3. Stop 0.9.0.1 Kafka Broker (ctrl-c or stop script)
      4. Try to stop application...hangs at consumer.close() indefinitely.

      I also see this same behavior using 0.10 broker and client.

      This is my first bug reported to Kafka, so please let me know if I should be following a different format. Thanks!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                singhashish Ashish Singh
                Reporter:
                alex-cook4 Alexander Cook
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: