Hi @moinsam ! Thank you alot for this suggestion. I am thinking about going one step further and let the KeyingStrategy suggest a org.apache.kafka.common.serialization.Serializer class/className to configure the producer with as key serializer (which would still be overwritable via configuration). Otherwise one would always need to configure a matching KeyingStrategy with a matching Serializer. But most KeyingStrategies would already know which Serializer would work well. E.g. most KeyingStrategies creating a string could use the org.apache.kafka.common.serialization.StringSerializer.
From what I see, your example from the Readme would fail at runtime with class cast exceptions because our KafkaAppender would use a ByteArraySerializer if not configured otherwise (correct me if I am wrong).
Hi @moinsam ! Thank you alot for this suggestion. I am thinking about going one step further and let the KeyingStrategy suggest a
org.apache.kafka.common.serialization.Serializer
class/className to configure the producer with as key serializer (which would still be overwritable via configuration). Otherwise one would always need to configure a matching KeyingStrategy with a matching Serializer. But most KeyingStrategies would already know which Serializer would work well. E.g. most KeyingStrategies creating a string could use theorg.apache.kafka.common.serialization.StringSerializer
.From what I see, your example from the Readme would fail at runtime with class cast exceptions because our KafkaAppender would use a ByteArraySerializer if not configured otherwise (correct me if I am wrong).