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

Ability to cleanly abort the KafkaProducer

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8.2.0
    • Fix Version/s: None
    • Component/s: clients, producer
    • Labels:
      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

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

              Dates

              • Created:
                Updated: