I work with Kafka and try to use data from it. From the line below, I can poll data from Kafka.
while (true) { ConsumerRecords<byte[], <byte[]> records = consumer.poll(Long.MAX_VALUE); for (ConsumerRecord<byte[], <byte[]> record : records) {
My question is what benefit do I get by providing Long.MAX_VALUE as a timeout compared to if I provide 200 as a timeout. What is the best practice for a system that will launch production.
Can someone explain to me the difference in high timeout versus low timeout and which should be used in the production system?
source share