Sets max poll records to 2 so that the last correct offset is retrieved after restarting the FASTEN server.
@@ -46,7 +46,7 @@ public abstract class FastenKafkaConnection extends Thread {
properties.setProperty(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, deserializer);
properties.setProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
properties.setProperty(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "false");
- properties.setProperty(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, "10");
+ properties.setProperty(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, "2");
properties.setProperty(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG, "1000000");
return properties;
