Which property in broker configuration specifies that a broker belongs to a particular rack?
Which property in broker configuration specifies that a broker belongs to a particular rack?
The broker.rack property is used in a Kafka broker's configuration to specify the rack or availability zone the broker belongs to. This is important for rack-aware replica placement, allowing Kafka to distribute replicas across different racks for fault tolerance.
Your Kafka cluster has four brokers. The topic t1 on the cluster has two partitions, and it has a replication factor of three. You create a Consumer Group with four consumers, which subscribes to t1.
In the scenario above, how many Controllers are in the Kafka cluster?
In a Kafka cluster, only one broker acts as the Controller at any given time. The Controller is responsible for managing cluster metadata, such as partition leadership and broker status. Even if the cluster has multiple brokers (in this case, four), only one is elected as the Controller, and others serve as regular brokers. If the current Controller fails, another broker is automatically elected to take its place.
You have a cluster with a topic t1 that already has uncompressed messages. A new Producer starts sending messages to t1 with compression enabled.
Which condition would allow this?
Kafka allows mixed compression formats within the same topic and even the same partition. Each message batch includes metadata indicating whether and how it is compressed. Therefore, a new producer can send compressed messages to a topic that already contains uncompressed messages, as long as it is configured with a compression codec (e.g., compression.type=gzip, snappy, etc.).
A broker in the Kafka cluster is currently acting as the Controller.
Which statement is correct?
The Controller broker is a regular broker that also takes on additional responsibilities for managing cluster metadata, such as leader elections and partition assignments. It still hosts topic partitions and participates in replication like any other broker.
How can load balancing of Kafka clients across multiple brokers be accomplished?
Partitions are the primary mechanism for achieving load balancing in Kafka. When a topic has multiple partitions, Kafka clients (producers and consumers) can distribute the load across brokers hosting these partitions.
Shayne
12 hours agoTarra
2 days ago