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 D9055179FF for ; Fri, 22 Jan 2016 09:01:40 +0000 (UTC) Received: (qmail 47563 invoked by uid 500); 22 Jan 2016 09:01:40 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 47469 invoked by uid 500); 22 Jan 2016 09:01:40 -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 47407 invoked by uid 99); 22 Jan 2016 09:01:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2016 09:01:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D8C6C2C1F5D for ; Fri, 22 Jan 2016 09:01:39 +0000 (UTC) Date: Fri, 22 Jan 2016 09:01:39 +0000 (UTC) From: "Pierre-Yves Ritschard (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-3006) Make collection default container type for sequences in the consumer API 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-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112115#comment-15112115 ] Pierre-Yves Ritschard commented on KAFKA-3006: ---------------------------------------------- Hi [~gwenshap], I'm happy to go through the process. I don't seem to have authorization to create pages in the Kafka space on confluence though. My user-id there is "pyr" > Make collection default container type for sequences in the consumer API > ------------------------------------------------------------------------ > > Key: KAFKA-3006 > URL: https://issues.apache.org/jira/browse/KAFKA-3006 > Project: Kafka > Issue Type: Improvement > Components: clients > Affects Versions: 0.9.0.0 > Reporter: Pierre-Yves Ritschard > Labels: patch > > The KafkaConsumer API has some annoying inconsistencies in the usage of collection types. For example, subscribe() takes a list, but subscription() returns a set. Similarly for assign() and assignment(). We also have pause() , seekToBeginning(), seekToEnd(), and resume() which annoyingly use a variable argument array, which means you have to copy the result of assignment() to an array if you want to pause all assigned partitions. We can solve these issues by adding the following variants: > {code} > void subscribe(Collection topics); > void subscribe(Collection topics, ConsumerRebalanceListener); > void assign(Collection partitions); > void pause(Collection partitions); > void resume(Collection partitions); > void seekToBeginning(Collection); > void seekToEnd(Collection); > {code} > This issues supersedes KAFKA-2991 -- This message was sent by Atlassian JIRA (v6.3.4#6332)