`commitAsync()` in `onPartitionsRevoked()`
[demos/kafka/training] / src / main / java / de / juplo / kafka / EndlessConsumer.java
index 00678c4..f0e74d3 100644 (file)
@@ -71,8 +71,7 @@ public class EndlessConsumer<K, V> implements Runnable
     }
     catch(WakeupException e)
     {
-      log.info("{} - RIIING! Request to stop consumption - commiting current offsets!", id);
-      consumer.commitSync();
+      log.info("{} - RIIING! Request to stop consumption.", id);
       shutdown();
     }
     catch(RecordDeserializationException e)
@@ -86,7 +85,6 @@ public class EndlessConsumer<K, V> implements Runnable
           offset,
           e.getCause().toString());
 
-      consumer.commitSync();
       shutdown(e);
     }
     catch(Exception e)