Kafka Broker vs Topic

2019-05-04 11:33发布

A topic usually resides within the broker (server process) and has multiple partitions, but can it span across multiple brokers or nodes (machines)?

i.e, lets say a topic is divided into two partitions, partition-1 and partition-2. Can partition-1 belong to broker-1 and partition-2 of the same topic belong to a different broker-2 or a different node altogether?

3条回答
何必那么认真
2楼-- · 2019-05-04 12:04

A Kafka cluster consists of one or more servers (Kafka brokers).

Each Broker can have one or more Topics. Kafka topics are divided into a number of partitions, each partition can be placed on a single or separate machine to allow for multiple consumers to read from a topic in parallel.

查看更多
迷人小祖宗
3楼-- · 2019-05-04 12:06

Yes, different partitions of a topic can be stored in multiple machines. But, a single partition has to be stored entirely in one machine.

查看更多
smile是对你的礼貌
4楼-- · 2019-05-04 12:16

Th kafka topics are replicated across multiple brokers so that multiple consumers can receive the data parallely or in case the one broker goes down , the data can be retrieved from other broker with the same topic partition.

查看更多
登录 后发表回答