Kafka - with Java/Python
Examine the following Kafka consumer code snippet. What is the primary issue that could cause the consumer to miss messages?
consumer.subscribe(Collections.singletonList("topic1"));
while (true) {
ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100));
for (ConsumerRecord<String, String> record : records) {
System.out.println(record.value());
}
}