I want to be able to catch unretryable exceptions when sending a message through kafkaTemplate and then send the message to a different error topic where I can investigate the message.
How it's easier to implement such a behavior on consumer side than in producer side ?
I understand that for some exceptions like RecordTooLargeException the message could not be send to the new topic either. But for these kind of messages I will log it to the system as warning.
I don't know how to approach this problem and what Kafka actually offer as functionality for this kind of handling on the producer side.