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 AED3718B53 for ; Mon, 3 Aug 2015 17:10:06 +0000 (UTC) Received: (qmail 57696 invoked by uid 500); 3 Aug 2015 17:10:05 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 57610 invoked by uid 500); 3 Aug 2015 17:10:05 -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 57592 invoked by uid 99); 3 Aug 2015 17:10:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2015 17:10:05 +0000 Date: Mon, 3 Aug 2015 17:10:05 +0000 (UTC) From: "Dong Lin (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-2388) subscribe(topic)/unsubscribe(topic) should either take a callback to allow user to handle exceptions or it should be synchronous. 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-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652126#comment-14652126 ] Dong Lin commented on KAFKA-2388: --------------------------------- [~hachikuji] Sorry, my bad.. [~onurkaraman] is working on it but I assigned it to [~becket_qin] by mistake. > subscribe(topic)/unsubscribe(topic) should either take a callback to allow user to handle exceptions or it should be synchronous. > --------------------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-2388 > URL: https://issues.apache.org/jira/browse/KAFKA-2388 > Project: Kafka > Issue Type: Sub-task > Reporter: Jiangjie Qin > Assignee: Onur Karaman > > According to the mailing list discussion on the consumer interface, we'll replace: > {code} > public void subscribe(String... topics); > public void subscribe(TopicPartition... partitions); > public Set subscriptions(); > {code} > with: > {code} > void subscribe(List topics, RebalanceCallback callback); > void assign(List partitions); > List subscriptions(); > List assignments(); > {code} > We don't need the unsubscribe APIs anymore. > The RebalanceCallback would look like: > {code} > interface RebalanceCallback { > void onAssignment(List partitions); > void onRevocation(List partitions); > // handle non-existing topics, etc. > void onError(Exception e); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)