Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
According to the mailing list discussion on the consumer interface, we'll replace:
public void subscribe(String... topics); public void subscribe(TopicPartition... partitions); public Set<TopicPartition> subscriptions();
with:
void subscribe(List<String> topics, RebalanceCallback callback); void assign(List<TopicPartition> partitions); List<String> subscriptions(); List<TopicPartition> assignments();
We don't need the unsubscribe APIs anymore.
The RebalanceCallback would look like:
interface RebalanceCallback { void onAssignment(List<TopicPartition> partitions); void onRevocation(List<TopicPartition> partitions); // handle non-existing topics, etc. void onError(Exception e); }