[
https://issues.apache.org/jira/browse/KAFKA-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14697688#comment-14697688
]
ASF GitHub Bot commented on KAFKA-2388:
---------------------------------------
GitHub user hachikuji opened a pull request:
https://github.com/apache/kafka/pull/139
KAFKA-2388 [WIP]; refactor KafkaConsumer subscribe API
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hachikuji/kafka KAFKA-2388
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/139.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 #139
----
commit dac975a77624f5a7865746736c334a76e8360182
Author: Jason Gustafson <[email protected]>
Date: 2015-08-14T20:16:25Z
KAFKA-2388 [WIP]; refactor KafkaConsumer subscribe API
----
> 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: Jason Gustafson
>
> 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<TopicPartition> subscriptions();
> {code}
> with:
> {code}
> void subscribe(List<String> topics, RebalanceCallback callback);
> void assign(List<TopicPartition> partitions);
> List<String> subscriptions();
> List<TopicPartition> assignments();
> {code}
> We don't need the unsubscribe APIs anymore.
> The RebalanceCallback would look like:
> {code}
> interface RebalanceCallback {
> void onAssignment(List<TopicPartition> partitions);
> void onRevocation(List<TopicPartition> partitions);
> // handle non-existing topics, etc.
> void onError(Exception e);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)