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

Ability to cleanly abort the KafkaProducer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.2.0
    • None
    • clients, producer
    • None

    Description

      I would like the ability to "abort" the Java Client's KafkaProducer. This includes the stopping the writing of buffered records.

      The motivation for this is described here.

      A sketch of this method is:

      public void abort() {
              try {
                  ioThread.interrupt();
                  ioThread.stop(new ThreadDeath());
              } catch (IllegalAccessException e) {
              }
      }
      

      but of course it is preferable to stop the ioThread by cooperation, rather than use the deprecated Thread.stop(new ThreadDeath()).

      Attachments

        Activity

          People

            junrao Jun Rao
            AndrewStein Andrew Stein
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: