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 A796BE664 for ; Tue, 5 Mar 2013 19:04:13 +0000 (UTC) Received: (qmail 90045 invoked by uid 500); 5 Mar 2013 19:04:13 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 89994 invoked by uid 500); 5 Mar 2013 19:04:13 -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 89859 invoked by uid 99); 5 Mar 2013 19:04:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 19:04:13 +0000 Date: Tue, 5 Mar 2013 19:04:13 +0000 (UTC) From: "Matan Safriel (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-496) high level producer send should return a response 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-496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593775#comment-13593775 ] Matan Safriel commented on KAFKA-496: ------------------------------------- I spent some time trying to first-iteration-refactor the producer's sending activity, as a basis for playing around with adding some persistence to it.... I'll probably wait for this item here (KAFKA-496) to be implemented first. I'm writing here just to add that it would potentially be nice if the producer's wrappers around sending messages would become simplified in the code through some behavior-maintaining refactoring. The producer internals around managing the queue and around sync/async flows can probably be made much simpler in terms of class and method relationships (or the relationships between producer and producer.async), as part of modifications implied on the previous posts above. I'm writing this as it may seem that KAFKA-496 here may take care of refactoring in this area anyway. It seems this can help future modifications... > high level producer send should return a response > ------------------------------------------------- > > Key: KAFKA-496 > URL: https://issues.apache.org/jira/browse/KAFKA-496 > Project: Kafka > Issue Type: Bug > Components: core > Reporter: Jun Rao > Assignee: Jay Kreps > Priority: Blocker > Labels: features > Fix For: 0.8.1 > > Original Estimate: 72h > Remaining Estimate: 72h > > Currently, Producer.send() doesn't return any value. In 0.8, since each produce request will be acked, we should pass the response back. What we can do is that if the producer is in sync mode, we can return a map of (topic,partitionId) -> (errorcode, offset). If the producer is in async mode, we can just return a null. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira