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);
}