[ 
https://issues.apache.org/jira/browse/KAFKA-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Onur Karaman updated KAFKA-2388:
--------------------------------
    Description: 
According to the mailing list discussion. The interface will be changed to:
{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}

  was:
According to the mailing list discussion. The interface will be changed to:
void subscribe(List<String> topic, RebalanceCallback callback);
void assign(List<partition> partitions);
List<String> subscriptions();
List<Topic> assignments();

We don't need unsubscribe anymore.

The RebalanceCallback will have one more following method:
void onError(Exception e);


> 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: Dong Lin
>
> According to the mailing list discussion. The interface will be changed to:
> {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)

Reply via email to