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

KafkaProducer.close(0) should be non-blocking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      According to the Java doc of producer.close(long timeout, TimeUnit timeUnit), it is said that "Specifying a timeout of zero means do not wait for pending send requests to complete". However, producer.close(0) can currently block on waiting for the sender thread to exit, which in turn can block on user's callback.

      We probably should not let producer.close(0) join the sender thread if user has specified zero timeout.

      Attachments

        Issue Links

          Activity

            People

              ahmeda Ahmed Al-Mehdi
              lindong Dong Lin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: