Stream Processing with Spring Cloud Stream and Apache Kafka Streams. Part 4 - Error Handling
Part 1 - Programming Model Part 2 - Programming Model Continued Part 3 - Data deserialization and serialization
Continuing with the series on looking at the Spring Cloud Stream binder for Kafka Streams, in this blog post, we are looking at the various error-handling strategies that are available in the Kafka Streams binder.
The error handling in Kafka Streams is largely centered around errors that occur during deserialization on the inbound and during production on the outbound.
Handling Deserialization Exceptions
Kafka Streams lets you register deserialization exception handlers. The default behavior is that, when you have a deserialization exception, it logs that error and fails the application (LogAndFailExceptionHandler
). It also lets you log and skip the record and continue the application (LogAndContinueExceptionHandler
). Normally, you provide the corresponding…