Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 557C717783 for ; Wed, 1 Oct 2014 03:40:39 +0000 (UTC) Received: (qmail 1233 invoked by uid 500); 1 Oct 2014 03:40:34 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 1181 invoked by uid 500); 1 Oct 2014 03:40:34 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 1167 invoked by uid 99); 1 Oct 2014 03:40:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 03:40:34 +0000 Date: Wed, 1 Oct 2014 03:40:34 +0000 (UTC) From: "Jay Kreps (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-1659) Ability to cleanly abort the KafkaProducer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-1659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154292#comment-14154292 ] Jay Kreps commented on KAFKA-1659: ---------------------------------- Yeah that makes sense. I feel like maybe the real issue here is that we don't have a request timeout in NetworkClient. That is a problem in and of itself and fixing it would also make this new api unnecessary, right? > Ability to cleanly abort the KafkaProducer > ------------------------------------------ > > Key: KAFKA-1659 > URL: https://issues.apache.org/jira/browse/KAFKA-1659 > Project: Kafka > Issue Type: Improvement > Components: clients, producer > Affects Versions: 0.8.2 > Reporter: Andrew Stein > Assignee: Jun Rao > Fix For: 0.8.2 > > > 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|http://mail-archives.apache.org/mod_mbox/kafka-dev/201409.mbox/%3CCAOk4UxB7BJm6HSgLXrR01sksB2dOC3zdt0NHaKHz1EALR6%3DCTQ%40mail.gmail.com%3E]. > A sketch of this method is: > {code} > public void abort() { > try { > ioThread.interrupt(); > ioThread.stop(new ThreadDeath()); > } catch (IllegalAccessException e) { > } > } > {code} > but of course it is preferable to stop the {{ioThread}} by cooperation, rather than use the deprecated {{Thread.stop(new ThreadDeath())}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)