From: Kai Moritz Date: Sun, 20 Jun 2021 11:59:00 +0000 (+0200) Subject: Ignoring poision pills with illeagal state-changes X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=54ae9a8e8d789292bd83a6bda1d12ac8ba238164;p=demos%2Fkafka%2Fdemos-kafka-payment-system-transfer Ignoring poision pills with illeagal state-changes --- diff --git a/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java b/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java index 63fbef5..18f5383 100644 --- a/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java +++ b/src/main/java/de/juplo/kafka/payment/transfer/adapter/TransferConsumer.java @@ -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