A broker node is a server in a Kafka cluster that stores and manages message data. It receives messages from producers, stores them, and serves them to consumers.
Click to reveal answer
beginner
How does a Kafka broker handle message storage?
A Kafka broker stores messages in partitions on disk. Each partition is an ordered, immutable sequence of messages that is continually appended to.
Click to reveal answer
intermediate
What role does a broker node play in fault tolerance?
Broker nodes replicate partitions to other brokers. If one broker fails, another broker with a replica can take over, ensuring no data loss and high availability.
Click to reveal answer
intermediate
Explain the difference between a leader and follower broker in Kafka.
Each partition has one leader broker that handles all reads and writes. Other brokers with replicas are followers that replicate data from the leader to stay in sync.
Click to reveal answer
beginner
How do broker nodes communicate with producers and consumers?
Broker nodes use TCP connections to communicate with producers and consumers. Producers send messages to brokers, and consumers fetch messages from brokers.
Click to reveal answer
What is the main function of a Kafka broker node?
AStore and manage messages
BProduce messages only
CConsume messages only
DManage user authentication
✗ Incorrect
Kafka broker nodes store and manage messages by receiving from producers and serving to consumers.
What is a partition leader in Kafka?
AA consumer that reads messages
BA backup server for Kafka
CA producer that sends messages
DA broker that handles all reads and writes for a partition
✗ Incorrect
The leader broker manages all read and write requests for its partition.
How do Kafka brokers ensure data availability if one broker fails?
ABy replicating partitions to follower brokers
BBy deleting old messages
CBy stopping all producers
DBy restarting the cluster
✗ Incorrect
Replication to follower brokers allows failover and data availability.
Which protocol do Kafka brokers use to communicate with clients?
AFTP
BTCP
CHTTP
DSMTP
✗ Incorrect
Kafka brokers use TCP connections for communication with producers and consumers.
What happens if a follower broker falls behind the leader?
AIt deletes all data
BIt becomes the leader immediately
CIt tries to catch up by replicating missing data
DIt disconnects from the cluster
✗ Incorrect
Followers replicate data from the leader to stay synchronized.
Describe the role of broker nodes in a Kafka cluster and how they manage message data.
Think about how messages flow through Kafka and where they are kept.
You got /4 concepts.
Explain how Kafka broker nodes handle fault tolerance and data replication.
Consider what happens if one broker stops working.
You got /4 concepts.
Practice
(1/5)
1.
What is the primary role of a broker node in Kafka?
easy
A. Store and manage Kafka messages
B. Produce messages to topics
C. Consume messages from topics
D. Monitor network traffic
Solution
Step 1: Understand broker node function
A broker node is a Kafka server that stores and manages messages.
Step 2: Differentiate roles
Producers send messages, consumers read them, but brokers store/manage them.
Final Answer:
Store and manage Kafka messages -> Option A
Quick Check:
Broker = Store/manage messages [OK]
Hint: Broker nodes store messages; producers and consumers do not [OK]
Common Mistakes:
Confusing brokers with producers or consumers
Thinking brokers monitor network traffic
Assuming brokers only route messages
2.
Which of the following is the correct way to specify a broker's unique ID in the Kafka server.properties file?
easy
A. broker.id=1
B. brokerID=1
C. broker-id=1
D. brokerId=1
Solution
Step 1: Recall Kafka broker ID syntax
The correct property name is broker.id with a dot separator.
Step 2: Check options for exact match
Only broker.id=1 matches Kafka's expected syntax.
Final Answer:
broker.id=1 -> Option A
Quick Check:
Broker ID property uses dot notation [OK]
Hint: Broker ID uses dot notation: broker.id [OK]
Common Mistakes:
Using camelCase or hyphens instead of dot
Misspelling the property name
Confusing broker.id with other properties
3.
Given the following snippet from a Kafka server.properties file: