From c4307f77ada5184c5c657f86ff086bdf1505c70b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 2 Apr 2022 15:11:40 +0200 Subject: [PATCH] =?utf8?q?F=C3=BCr=20null-Keys=20wird=20der=20String=20NUL?= =?utf8?q?L=20gez=C3=A4hlt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/EndlessConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/juplo/kafka/EndlessConsumer.java b/src/main/java/de/juplo/kafka/EndlessConsumer.java index 063a09e..127c3d3 100644 --- a/src/main/java/de/juplo/kafka/EndlessConsumer.java +++ b/src/main/java/de/juplo/kafka/EndlessConsumer.java @@ -94,7 +94,7 @@ public class EndlessConsumer implements Runnable ); Integer partition = record.partition(); - String key = record.key(); + String key = record.key() == null ? "NULL" : record.key(); if (!seen.containsKey(partition)) seen.put(partition, new HashMap<>()); -- 2.20.1