Certified Developer for Apache Kafka · 30% of the exam

Kafka Streams and Stream Processing: free practice questions

5 sample questions from our 16-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Confluent exam.

1. A developer wants to route records to different output streams based on a predicate (e.g., high-value vs low-value orders). Which stateless operation fits?

  • A. branch / split✓ Correct
  • B. aggregate
  • C. reduce
  • D. windowedBy
Explanation

branch (split) divides a stream into multiple streams based on predicates — a stateless routing operation. aggregate (B) and reduce (C) are stateful, and windowedBy (D) applies windowing to an aggregation.

2. A design must count events in fixed, non-overlapping 5-minute intervals. Which windowing type should the developer use?

  • A. Tumbling windows✓ Correct
  • B. Hopping windows
  • C. Session windows
  • D. No window (global aggregation)
Explanation

Tumbling windows are fixed-size, non-overlapping time intervals — perfect for counting events per 5-minute bucket. Hopping windows (B) overlap, session windows (C) are gap-based around activity, and a global aggregation (D) has no time bucketing.

3. A stream-processing application must compute a running total of sales per product. Which Kafka Streams construct is required?

  • A. A stateful aggregation backed by a state store✓ Correct
  • B. A stateless map operation
  • C. A stateless filter
  • D. A simple print to console
Explanation

A running total per key requires a stateful aggregation (e.g., aggregate/reduce) backed by a state store that persists the accumulating value. Stateless map (B) and filter (C) don't accumulate state, and printing (D) doesn't compute totals.

4. Which Kafka Streams operation transforms each input record into zero or more output records?

  • A. flatMap✓ Correct
  • B. filter
  • C. count
  • D. peek
Explanation

flatMap maps each input record to zero, one, or many output records. filter (B) keeps or drops records (0 or 1), count (C) is a stateful aggregation, and peek (D) performs a side effect without changing the stream.

5. How does Kafka Streams provide fault tolerance for its local state stores?

  • A. It backs state stores with changelog topics in Kafka, so state can be restored after a failure✓ Correct
  • B. It writes state only to local disk with no backup
  • C. It disables state on failure
  • D. It stores state in the Schema Registry
Explanation

Kafka Streams backs each state store with a changelog topic in Kafka; if an instance fails, the state is restored by replaying the changelog on another instance. Local-disk-only (B) wouldn't survive instance loss, disabling state (C) loses data, and the Schema Registry (D) stores schemas, not state.

11 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free
Kafka Streams and Stream Processing — Free Certified Developer for Apache Kafka Practice Questions | DataCertPrep — Certification Prep