简体   繁体   中英

In Kafka, Is it possible to have replication for selective partitions from one topic?

As I understand that we can have replication at topic level where all partitions of a Topic will be replicated across cluster. But can we control replication of only selective partitions from a topic?

No. From the doc

Kafka replicates the log for each topic's partitions across a configurable number of servers (you can set this replication factor on a topic-by-topic basis).

If you think about the design of Kafka, what are Topics and Partitions, it makes sense:

  • Topics are streams or category of messages, so it's a way to organise your messages based on their type and content
  • partitions are basically a concept to handle smoothly distribution. They are based on a Key, but the original idea is to split your messages evenly on all partitions of one Topic. It's not really designed to organise messages for business use, but for architectural constraint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM