You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Ming Liu <mi...@gmail.com> on 2018/12/10 18:32:46 UTC

Kafka client Metadata update on demand?

Hey community,
    It seems Kafka Metadata update only happens at the pre-configured
Metadata update interval.  During upgrade, when leader changes, the client
will fail with NotLeaderForPartitionException until next Metadata update
happened.  I wonder why we don't have the on-demand Metadata update (that
is, have Metadata update when there is exception like
NotLeaderForPartitionException)?

Thanks!
Ming

Re: Kafka client Metadata update on demand?

Posted by Mayuresh Gharat <gh...@gmail.com>.
Hi Ming,

Kafka clients do update there metadata on NotLeaderForPartitionException.
The metadata update happens asynchronously.

Also if you are getting this exception for a longer time, it might mean
that your client is fetching metadata from a broker whose metadata cache is
not updated with the latest metadata (he broker has not yet processed the
updateMetadataRequest from the controller).

Thanks,

Mayuresh

On Mon, Dec 10, 2018 at 10:39 AM Ming Liu <mi...@gmail.com> wrote:

> Hey community,
>     It seems Kafka Metadata update only happens at the pre-configured
> Metadata update interval.  During upgrade, when leader changes, the client
> will fail with NotLeaderForPartitionException until next Metadata update
> happened.  I wonder why we don't have the on-demand Metadata update (that
> is, have Metadata update when there is exception like
> NotLeaderForPartitionException)?
>
> Thanks!
> Ming
>


-- 
-Regards,
Mayuresh R. Gharat
(862) 250-7125