nerdexam
Confluent

CCDAK · Question #88

Which of the following Kafka Streams operators are stateless? (select all that apply)

The correct answer is A. map B. filter C. flatmap D. branch E. groupBy. Map, filter, flatMap, branch, and groupBy are all stateless because they process each record independently without storing any information about previously seen records - they simply transform, filter, split, or rekey data on a per-record basis, requiring no state store. Aggregat

Developing with Kafka Streams

Question

Which of the following Kafka Streams operators are stateless? (select all that apply)

Options

  • Amap
  • Bfilter
  • Cflatmap
  • Dbranch
  • EgroupBy
  • Faggregate

How the community answered

(22 responses)
  • A
    95% (21)
  • F
    5% (1)

Explanation

Map, filter, flatMap, branch, and groupBy are all stateless because they process each record independently without storing any information about previously seen records - they simply transform, filter, split, or rekey data on a per-record basis, requiring no state store.

Aggregate (F) is the distractor: it is explicitly stateful because it must accumulate values across multiple records (e.g., summing counts or building collections), which requires a persistent state store backed by a changelog topic in Kafka.

A subtle point worth noting: groupBy might seem stateful because it precedes stateful operations like aggregate, but groupBy itself only rekeys records and returns a KGroupedStream - it stores nothing; the state begins only when a downstream aggregation is applied.

Memory tip: Think "STORE = stateful." If an operator needs to remember past records to produce its output (aggregate, count, reduce, join), it's stateful. If it can process each record in isolation and throw it away, it's stateless - map, filter, flatMap, branch, and groupBy all pass this test.

Topics

#stateless operators#map#filter#groupBy

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice