I have an aplication written in kotlin and I use one quiet straightforward Kafka stream inside.
I provided ProductionExceptionHandler and UncaughtExceptionHandler because I do not want the service to crash. Inside both of them I log the exception and then from the first handler I return ProductionExceptionHandlerResponse.CONTINUE, and from the second one StreamThreadExceptionResponse.REPLEACE_THREAD.
I have a test where I force the stream to throw RecordTooLargeException, it is thrown correctly and ProductionExceptionHandler is involved in handling that one.
The problem is: Service goes into an infinite loop and tries to send the problematic message again and again.
Can I somehow skip that message? The transaction of course is never commited. It tries to end that one.