Learn Labs
Producers

Self-test

Check your understanding

Self-test11 questions

—/11
  1. How does a key determine a partition, and why does that preserve per-key ordering?

  2. What's a hot key, and why doesn't adding partitions fix it?

  3. Why might a Python and a Java producer send the same key to different partitions?

  4. How does the sticky partitioner work, and why can a burst land on a single partition?

  5. Why did linger.ms=20 make the lab producer about 8x faster? What does it cost?

  6. What are three ways a producer can silently lose records in application code?

  7. Compare acks=0, 1, and all. Why does acks=all need min.insync.replicas?

  8. With RF 3 and min.insync.replicas=2, what happens to writes when one broker is down? Two?

  9. How do producer ids and sequence numbers prevent duplicates and reordering?

  10. Why doesn't idempotence protect against duplicates after an application restart?

  11. Design question

    Configure producers and topics for (a) clickstream analytics and (b) payment events. Justify every setting that differs.