- Create its input topic on the Topics page (the topic names are in each example).
- Check Stream Properties —
bootstrap.serversshould point at your cluster. - Submit, then produce a few messages to the input topic (Topics → Create Message) and watch the output topic.
1 — Filter and transform (stateless)
demo-input → Filter → Map Values → demo-output. Keeps only
records whose value contains error, then upper-cases them. Two SpEL
expressions, no state — the smallest useful pipeline:
filterAndMapValues.json
filterAndMapValues.json
2 — Word count (stateful)
The classic.text-lines → FlatMap Values (tokenize) → Group By
(the word becomes the key) → Count → To Stream → word-counts.
Long —
note the sink’s value serde. To Stream converts the table’s changelog back
into a stream for the sink. Produce a few text lines and watch per-word counts
accumulate on word-counts.
wordCount.json
wordCount.json
3 — Tumbling-window count (windowed)
windowing-input → Group By Key → Tumbling Window (5 seconds) →
Count → To Stream → Select Key → window-out-tumbling. Counts
records per key, per 5-second window — the same count pattern as word count,
but the total resets with each window instead of running forever. Grouping is
by the existing key, and the window node just carries its size
(windowSizeMs: 5000). One expression:
Windowed object, not the plain
key, and a String key serde cannot write it — without the unwrap the sink
node carries an error badge and the deploy is refused. Select Key turns
it into k1@5000, the key plus the window’s start, so the sink’s String key
serde applies (windowed keys).
Produce several messages with the same key in quick succession, wait past the
window, produce again — the output shows a count per window, keyed by the
window start.
tumblingWindow.json
tumblingWindow.json