Ignoring poision pills with illeagal state-changes
authorKai Moritz <kai@juplo.de>
Sun, 20 Jun 2021 11:59:00 +0000 (13:59 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 20 Jun 2021 11:59:00 +0000 (13:59 +0200)
src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java

index 63fbef5..18f5383 100644 (file)
@@ -105,6 +105,16 @@ public class TransferConsumer implements Runnable
           record.partition(),
           record.value());
     }
+    catch (IllegalArgumentException e)
+    {
+      log.error(
+          "ignoring invalid message #{} on {}/{}: {}, message={}",
+          record.offset(),
+          record.topic(),
+          record.partition(),
+          e.getMessage(),
+          record.value());
+    }
   }
 
   @EventListener