Problem Statement
Which technique best handles a slow consumer so it does not overwhelm the system?
Explanation
Bounded prefetch limits in-flight messages and memory use. Pausing partitions or adding consumers prevents backlog growth and reduces latency spread.
Unbounded prefetch and disabled acks cause loss or memory pressure.
Code Solution
SolutionRead Only
prefetch=100; onLag↑ → pause(partition) or addConsumer()
Practice Sets
This question appears in the following practice sets:
