nerdexam
Confluent

CCDAK · Question #208

The producer code below features a 'Callback' class with a method called 'onCompletion()'. In the 'onCompletion()' method, when the request is completed successfully, what does the…

The correct answer is A. The sequential ID of the message committed into a partition. The metadata.offset() value represents the sequential ID of the message committed into a partition. It indicates the position of the record within the Kafka partition log, which is useful for tracking and replaying records.

Developing Kafka Producers

Question

The producer code below features a 'Callback' class with a method called 'onCompletion()'. In the 'onCompletion()' method, when the request is completed successfully, what does the 'metadata.offset()' value represent?

Exhibit

CCDAK question #208 exhibit

Options

  • AThe sequential ID of the message committed into a partition
  • BIts position in the producer's batch of massages
  • CThe number of bytes that overflowed beyond a producer batch of messages
  • DThe ID of the partition to which the message was committed

How the community answered

(32 responses)
  • A
    88% (28)
  • B
    3% (1)
  • C
    6% (2)
  • D
    3% (1)

Explanation

The metadata.offset() value represents the sequential ID of the message committed into a partition. It indicates the position of the record within the Kafka partition log, which is useful for tracking and replaying records.

Topics

#producer callback#RecordMetadata#offset#onCompletion

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice