Re: Reading from lagging replicas

2021-09-20 Thread Michał Łowicki
Thanks. I'm aware of ISR but looking for exact logic inside Java client how
is this handled so when follower replica, consumer is using, starts lagging
/ goes out-of-sync.

On Mon, Sep 20, 2021 at 2:52 PM Luke Chen  wrote:

> Hi Michał,
> I think you want to check the term in Kafka: In Sync Replicas (a.k.a ISR).
> You might want to check the "Replication" section in doc here
> .
>
> The configuration is this one: *replica.lag.time.max.ms
> *
>
> https://kafka.apache.org/documentation/#brokerconfigs_replica.lag.time.max.ms
>
> Hope that helps.
>
> Thank you.
> Luke
>
> On Mon, Sep 20, 2021 at 8:30 PM Michał Łowicki  wrote:
>
> > Hey,
> >
> > When Java client is reading from replica then how is handled the case
> when
> > such replica starts to lag? (struggles to replicate data from the
> leader).
> > Does consumer, coordinator or group leader have any logic to detect such
> > cases and try to switch over to other replica in those cases? (pointers
> to
> > code, configuration options would be awesome). Thanks in advance.
> >
> > --
> > BR,
> > Michał Łowicki
> >
>


-- 
BR,
Michał Łowicki


Re: Reading from lagging replicas

2021-09-20 Thread Luke Chen
Hi Michał,
I think you want to check the term in Kafka: In Sync Replicas (a.k.a ISR).
You might want to check the "Replication" section in doc here
.

The configuration is this one: *replica.lag.time.max.ms
*
https://kafka.apache.org/documentation/#brokerconfigs_replica.lag.time.max.ms

Hope that helps.

Thank you.
Luke

On Mon, Sep 20, 2021 at 8:30 PM Michał Łowicki  wrote:

> Hey,
>
> When Java client is reading from replica then how is handled the case when
> such replica starts to lag? (struggles to replicate data from the leader).
> Does consumer, coordinator or group leader have any logic to detect such
> cases and try to switch over to other replica in those cases? (pointers to
> code, configuration options would be awesome). Thanks in advance.
>
> --
> BR,
> Michał Łowicki
>