kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Bukowinski <pmb...@gmail.com>
Subject Re: Question for min.insync.replicas
Date Tue, 09 Apr 2019 16:42:00 GMT

> On Apr 9, 2019, at 8:55 AM, Han Zhang <walkerline@hotmail.com> wrote:
> 
> Hi
> 
> Is there a property that I can set the min insync replicas to an individual topic?
> 
> I only know min.insync.replicas but it's for the broker level.
> 
> Thanks

Hi Han,

Yes, the topic-level config is also min.insync.replicas. You set it using the `kafka-topics`
tool, e.g.

/path/to/kafka-topics.sh \
    --zookeeper 127.0.0.1:2181 \
    --alter \
    --topic my_topic \
    --config min.insync.replicas=1

You can also set this property when you create the topic:

/path/to/kafka-topics.sh \
    --zookeeper 127.0.0.1:2181 \
    --create \
    --topic new_topic \
    --replication-factor 3 \
    --partitions 20 \
    --config min.insync.replicas=1

—
Peter Bukowinski
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message