nerdexam
Confluent

CCDAK · Question #54

What kind of delivery guarantee this consumer offers? while (true) { ConsumerRecords<String, String> records = consumer.poll(100); try { consumer.commitSync(); } catch (CommitFailedException e) { log.

Sign in or unlock CCDAK to reveal the answer and full explanation for question #54. The question stem and answer options stay visible for context.

Developing Kafka Consumers

Question

What kind of delivery guarantee this consumer offers? while (true) { ConsumerRecords<String, String> records = consumer.poll(100); try { consumer.commitSync(); } catch (CommitFailedException e) { log.error("commit failed", e) } for (ConsumerRecord<String, String> record records) { System.out.printf("topic = %s, partition = %s, offset = %d, customer = %s, country = %s ", record.topic(), record.partition(), record.offset(), record.key(), record.value()); } }

Options

  • AExactly-once
  • BAt-least-once
  • CAt-most-once

Unlock CCDAK to see the answer

You've previewed enough free CCDAK questions. Unlock CCDAK for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#delivery semantics#at-most-once#commitSync#consumer offset
Full CCDAK Practice