Stream Processing with Spring Cloud Stream and Apache Kafka Streams. Part 5 - Application Customizations
In this blog post, we continue our discussion on the support for Kafka Streams in Spring Cloud Stream. We are going to elaborate on the ways in which you can customize a Kafka Streams application.
Kafka Streams binder uses the StreamsBuilderFactoryBean, provided by the Spring for Apache Kafka project, to build the StreamsBuilder object that is the foundation for a Kafka Streams application. This factory bean is a Spring lifecycle bean. Oftentimes, this factory bean must be customized before it is started, for various reasons. As described in the previous blog post on error handling, you need to customize the
StreamsBuilderFactoryBean if you want to register a production exception handler. Let’s say that you have this producer exception handler: