nerdexam
Confluent

CCDAK · Question #48

Your topic is log compacted and you are sending a message with the key K and value null. What will happen?

The correct answer is A. The broker will delete all messages with the key K upon cleanup. Sending a message with the null value is called a tombstone in Kafka and will ensure the log compacted topic does not contain any messages with the key K upon compaction.

Application Design

Question

Your topic is log compacted and you are sending a message with the key K and value null. What will happen?

Options

  • AThe broker will delete all messages with the key K upon cleanup
  • BThe producer will throw a Runtime exception
  • CThe broker will delete the message with the key K and null value only upon cleanup
  • DThe message will get ignored by the Kafka broker

How the community answered

(54 responses)
  • A
    94% (51)
  • C
    2% (1)
  • D
    4% (2)

Explanation

Sending a message with the null value is called a tombstone in Kafka and will ensure the log compacted topic does not contain any messages with the key K upon compaction.

Topics

#log compaction#tombstone#null value#key deletion

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice