Question 26
A consumer sends a request to commit offset 2000. There is a temporary communication problem, so the broker never gets the request and therefore never responds. Meanwhile, the consumer processed another batch and successfully committed offset 3000. What should you do?
Question 27
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());
}
}
What kind of delivery guarantee this consumer offers?
Question 28
I am producing Avro data on my Kafka cluster that is integrated with the Confluent Schema Registry. After a schema change that is incompatible, I know my data will be rejected. Which component will reject the data?
Question 29
A producer just sent a message to the leader broker for a topic partition. The producer used acks=1 and therefore the data has not yet been replicated to followers. Under which conditions will the consumer see the message?
Question 30
What is returned by a producer.send() call in the Java API?
