[ https://issues.apache.org/jira/browse/KAFKA-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15202265#comment-15202265 ]
ASF GitHub Bot commented on KAFKA-3006: --------------------------------------- GitHub user hachikuji opened a pull request: https://github.com/apache/kafka/pull/1098 KAFKA-3006: standardize KafkaConsumer API to use Collection You can merge this pull request into a Git repository by running: $ git pull https://github.com/hachikuji/kafka KAFKA-3006 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1098.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1098 ---- commit 501f186fc5367df8e76f20cc923d2e90f00b07c7 Author: Pierre-Yves Ritschard <p...@spootnik.org> Date: 2015-12-17T15:44:30Z KAFKA-3006: standardize KafkaConsumer API to use Collection ---- > 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 > Assignee: Pierre-Yves Ritschard > Priority: Blocker > Labels: patch > Fix For: 0.10.0.0 > > > 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<String> topics); > void subscribe(Collection<String> topics, ConsumerRebalanceListener); > void assign(Collection<TopicPartition> partitions); > void pause(Collection<TopicPartition> partitions); > void resume(Collection<TopicPartition> partitions); > void seekToBeginning(Collection<TopicPartition>); > void seekToEnd(Collection<TopicPartition>); > {code} > This issues supersedes KAFKA-2991 -- This message was sent by Atlassian JIRA (v6.3.4#6332)