KIP-776 — Add Consumer#peek for debugging/tuning
Discussion Consumer
Adds a `Consumer.peek()` method that returns the next batch of records without advancing the fetch position or committed offsets, and makes `poll()` propagate fetch errors rather than silently returning empty results. Currently an empty `poll()` result is ambiguous between genuine unavailability and a fetch failure, and there is no way to inspect records without consuming them.
Details
| Author | Luke Chen |
| Status | Discussion |
| Wiki | View on Apache Wiki |
| Created | 2021-09-18 |
| Last Modified | 2021-10-05 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.