I'm a little confused by the serializers and message converters in spring-kafka. When should the Spring message converters be used and when only the Kafka serializers? As far as I could see in Spring the prefered way would be to configure the Kafka clients key/value serializer with StringSerializer and then configure a message converter on the KafkaTemplate for the actual POJO to string conversion. Is that correct?
I'm stuck trying to configure a DeadLetterPublishingRecoverer which should send messages to DLT for derialization errors as well as for any error while processing the deserialized message. The problem is that I need a JsonSerializer when the message was already deserialized but only a simple StringSerializer when the message could not be deserialized. Any ideas how to configure that?