Skip to content
Sharp

Microservice Architecture · interview question

In a Kafka architecture, how can you ensure that messages are processed only once by a consumer?

Multiple choiceHardchapter-18-curatedpremiummicroservice-architecturemessage-brokers-kafka
Choose one answer
Answer and explanation

Correct answer

D. By configuring the consumer to commit offsets after processing

Why

By committing offsets after a message is processed, you ensure that messages are not processed more than once. This is part of the 'exactly-once' semantics that Kafka provides when configured correctly.

Test yourself on Microservice Architecture

A free test with instant, explained results. No account needed.

Start free test
All Microservice Architecture questions →