KIP-121 — Add KStream peek method
Accepted Streams
Adds a peek(ForeachAction) method to KStream that applies a side-effect action (e.g., logging, metrics increment) to each record and passes the record unchanged to the next operator. KStream lacked a non-terminal inspection point; developers had to use map() with an identity transformation to observe records mid-pipeline, which could trigger unnecessary repartitioning.
Details
| Author | Steven Schlansker |
| Status | Accepted |
| JIRA | KAFKA-4720 |
| Wiki | View on Apache Wiki |
| Created | 2017-02-06 |
| Last Modified | 2017-04-27 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.