5.11 Self-test
Self-test31 questions
Before AdminClient existed, what were the three ways to handle "the topic might not exist," and what was wrong with each?
AdminClient Futures complete when what is true — and what is not guaranteed at that moment?
Which broker handles mutations? Which handles reads? What debugging symptom does that asymmetry produce?
Why must you always inspect
e.getCause()on anExecutionException?What does
close(Duration)do differently fromclose()?You use a DNS alias for bootstrap and SASL auth fails. Why, and what's the fix?
Your Kubernetes clients can't connect though brokers are healthy. Why, and what's the fix?
Why is
request.timeout.msdefaulted to 120 s, and when should you lower it? Describe the startup-validation pattern.Kafka Connect's config topic requires 1 partition, 3 replicas, and compaction. Give the reason for each.
What does
TopicDescriptioncontain — and what notable thing does it not contain?What race produces
TopicExistsException, and how should you handle it?Why is topic deletion described as needing "extra care"? What broker config guards it?
When is blocking
.get()the wrong choice, and what replaces it?isDefault()returns false. Name the two different situations that can cause that.What do
APPENDandSUBTRACTexist for, and what hazard do they avoid?Tell the config-recovery war story. What general principle does it establish?
Give the exact formula for consumer lag and the two API calls it requires.
What are the three
OffsetSpecimplementations, and what isforTimestamp()used for beyond seeking?Why is setting offsets preferable to deleting them?
Why does Kafka refuse to modify offsets for an active group? What exception do you get, and what does it really mean?
Explain the shoe-counting double-count. State the general rule about offsets and state.
.valid()vs.errors()vs.all()onlistConsumerGroups— when do you want each?createPartitionstakes what number, exactly? What must you do first?Why does Kafka's retention config not satisfy privacy law, and what two APIs compose into a compliant deletion?
After
deleteRecords, what's true immediately and what's only eventually true?Contrast preferred and unclean leader election. What does each cost you?
In a reassignment replica list like
[1,0], what is the significance of the ordering?How do you cancel an in-flight reassignment? What state does that restore?
What must you be careful about when reassigning replicas, and what tool does the book point you at?
Name two limitations of
MockAdminClient, and the Maven detail people miss.Why is "never use ZooKeeper directly" a forward-compatibility argument rather than a style preference?
Previous: Chapter 4 — Kafka Consumers Next: Chapter 6 — Kafka Internals