- 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 → 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. No expressions at all:
grouping is by the existing key, and the window node just carries its size
(windowSizeMs: 5000).
Produce several messages with the same key in quick succession, wait past the
window, produce again — the output shows a count per window.
tumblingWindow.json
tumblingWindow.json