Error Handling in Kafka Streams: Overview
Explore the three categories of errors in Kafka Streams—entry, processing, and exit—and understand how to manage them using specific exception handlers. This lesson helps you learn how to prevent application shutdowns by handling errors gracefully and integrating proper try/catch blocks within your Kafka Streams processors.
We'll cover the following...
Mistakes are a part of life, and errors in software are no different. Our Kafka Streams application will encounter errors at some point, and we will have to deal with these errors somehow.
By default, a Kafka Streams application will shut down on any uncaught exception. This is sensible when we are developing the application but very bad for running production applications. We rarely want our entire application to shut down just because we forgot to catch an exception or a transient external error has occurred.
Luckily, the Kafka Streams library does not leave us empty handed when it comes to error handling. There are three categories for errors in a Kafka Streams application: entry, processing, and exit.