How does Kafka guarantee message integrity after a message is written on a disk?
A.
A message can be edited by the producer, producing to the message offset.
B.
A message cannot be altered once it has been written.
C.
A message can be grouped with messages sharing the same key to improve read performance.
D.
Only message metadata can be altered using command line (CLI) tools.
The Answer Is:
B
This question includes an explanation.
Explanation:
Kafka ensures message immutability once data is written to disk. It guarantees that the message cannot be altered post-write, ensuring strong integrity.
From Kafka documentation:
“Kafka provides strong durability and immutability guarantees. Once a message is written and acknowledged, it cannot be modified.”
A → Incorrect: Offsets are immutable. Producers cannot overwrite messages.
C → Partially true for performance but not about message integrity.
D → Metadata changes do not affect message content or integrity.
Page Reference:
Kafka: The Definitive Guide, 1st Edition, Chapter 4, p. 122–123