From: Kai Moritz Date: Tue, 26 Jul 2022 14:11:45 +0000 (+0200) Subject: Verbesserungen des Testfalls gemerged (Branch 'deserialization') X-Git-Tag: sumup-adder---lvm-2-tage~9^2~7^2~1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=c032639acf2861b9039dc08e98bb7d9d1f59b086;p=demos%2Fkafka%2Ftraining Verbesserungen des Testfalls gemerged (Branch 'deserialization') --- c032639acf2861b9039dc08e98bb7d9d1f59b086 diff --cc src/main/java/de/juplo/kafka/ApplicationConfiguration.java index ddeb9d5,766740b..9fc0c70 --- a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java +++ b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java @@@ -58,13 -58,10 +58,14 @@@ public class ApplicationConfiguratio props.put("group.id", properties.getGroupId()); props.put("client.id", properties.getClientId()); props.put("auto.offset.reset", properties.getAutoOffsetReset()); + props.put("auto.commit.interval.ms", (int)properties.getCommitInterval().toMillis()); props.put("metadata.max.age.ms", "1000"); props.put("key.deserializer", StringDeserializer.class.getName()); - props.put("value.deserializer", LongDeserializer.class.getName()); + props.put("value.deserializer", JsonDeserializer.class.getName()); + props.put(JsonDeserializer.TYPE_MAPPINGS, + "message:" + ClientMessage.class.getName() + "," + + "greeting:" + Greeting.class.getName()); + props.put(JsonDeserializer.TRUSTED_PACKAGES, "de.juplo.kafka"); return new KafkaConsumer<>(props); }