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

Chia-Ping Tsai resolved KAFKA-21473.
------------------------------------
    Fix Version/s: 4.5.0
       Resolution: Fixed

> The docs of KafkaConsumer#unsubscribe should reference the new listener
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-21473
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21473
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Cheng Chueh
>            Priority: Minor
>             Fix For: 4.5.0
>
>
>  
> {code:java}
>     /**
>      * Unsubscribe from topics currently subscribed with {@link 
> #subscribe(Collection)} or {@link #subscribe(Pattern)}.
>      * This also clears any partitions directly assigned through {@link 
> #assign(Collection)}.
>      * <p>
>      * If the consumer owns partitions assigned by the group, the rebalance 
> listener is invoked to give them up
>      * ({@link ConsumerRebalanceListener#onPartitionsRevoked(Collection)}, or
>      * {@link ConsumerRebalanceListener#onPartitionsLost(Collection)}) as 
> part of this call, without requiring a call
>      * to {@link #poll(Duration)}.
>      * <p>
>      * <b>Note:</b> Unlike {@link #close()}, this method does not commit the 
> pending offsets before
>      * unsubscribing, even if {@code enable.auto.commit} is enabled. To avoid 
> duplicate processing upon re-joining,
>      * it is recommended to explicitly call {@link #commitSync()} before 
> invoking this method.
>      *
>      * @throws org.apache.kafka.common.KafkaException for any other 
> unrecoverable errors (e.g. rebalance callback errors)
>      */
>     @Override
>     public void unsubscribe() {
>         delegate.unsubscribe();
>     }
> {code}
> ConsumerRebalanceListener is the interface being removed, so the docs should 
> point to the new one
>  



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to