nerdexam
Confluent

CCDAK · Question #183

A producer is configured with the default partitioner. It is sending records to a topic that is configured with five partitions. The record does not contain any key. What is the result of this?

The correct answer is A. Records will be dispatched among the available partitions. When a record does not contain a key, the default partitioner dispatches records in a round-robin fashion among all available partitions.

Developing Kafka Producers

Question

A producer is configured with the default partitioner. It is sending records to a topic that is configured with five partitions. The record does not contain any key. What is the result of this?

Options

  • ARecords will be dispatched among the available partitions.
  • BRecords will be sent to partition '0'.
  • CAn error will be raised and no record will be sent.
  • DRecords will be sent to the least used partition.

How the community answered

(47 responses)
  • A
    94% (44)
  • C
    4% (2)
  • D
    2% (1)

Explanation

When a record does not contain a key, the default partitioner dispatches records in a round-robin fashion among all available partitions.

Topics

#default partitioner#keyless records#partition routing#producer configuration

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice