Kafka MCQs – Kafka Streams API

21.) Kafka Streams guarantees which type of processing?

A) Exactly-once (since v1.1+)
B) At-most-once
C) At-least-once
D) None of the above

Answer: Option A

Explanation: Kafka Streams offers exactly-once semantics (EOS) via idempotence and transactions.

22.) Which operation is NOT supported directly by the Kafka Streams DSL?

A) filter
B) branch
C) map
D) query

Answer: Option D

Explanation: While you can query state stores, querying is not a transformation DSL operation.

23.) Which of the following is used for debugging Kafka Streams topologies?

A) print()
B) peek()
C) log()
D) monitor()

Answer: Option B

Explanation: peek() allows observing data as it flows through the stream without modifying it.

24.) Which method would you use to gracefully stop a Kafka Streams app?

A) stop()
B) close()
C) end()
D) interrupt()

Answer: Option B

Explanation: close() is the recommended way to shut down the app and persist state.

25.) Kafka Streams stores local state in:

A) Zookeeper
B) External file system
C) RocksDB
D) Kafka logs

Answer: Option C

Explanation: Kafka Streams uses RocksDB as the default embedded state store.

Leave a Reply

Your email address will not be published. Required fields are marked *