KIP-1305 — Per-Record Context Processing for Kafka Consumers
Discussion ConsumerClient
Introduces a per-record processing context in the consumer client, giving frameworks an explicit newContext() hook marking when an individual record's processing starts and ends, rather than only the batch-level ConsumerInterceptor.onConsume(). The client currently has no per-record lifecycle notion, so OpenTelemetry, Datadog, Spring Kafka, SmallRye Reactive Messaging and Micronaut each reimplemented it; iterator-wrapping approaches equate iteration with processing and produce microsecond-long spans when records are dispatched to worker threads.
Details
| Author | Aditya Kousik |
| Status | Discussion |
| JIRA | KAFKA-20384 |
| Wiki | View on Apache Wiki |
| Created | 2026-03-31 |
| Last Modified | 2026-08-28 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.