liveBook · Manning

StreamsBuilderFactoryBean

As explained in Kafka Streams in Action, Second Edition

StreamsBuilderFactoryBean is a Spring Kafka factory bean that creates a StreamsBuilder and manages the startup and shutdown of a Kafka Streams application.

StreamsBuilderFactoryBean connects Spring configuration to a Kafka Streams application: it creates the StreamsBuilder and controls application startup and shutdown. @EnableKafkaStreams supplies the lifecycle wrapper, while a default KafkaStreamsConfiguration bean provides the settings used to create the factory bean. section 12.3

Configure the factory bean around three practical responsibilities:

  • Customize the underlying KafkaStreams instance before startup, for example by installing a StateListener that logs running-state assignments. section 12.3

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains configuration, topology injection, lifecycle control, and pre-start customization, but does not detail the factory implementation internals.
Examples
Uses loan-processing topology configuration and a StateListener that logs active task topic-partition assignments.
What it assumes
Requires @EnableKafkaStreams and a default KafkaStreamsConfiguration bean containing Kafka Streams settings.
What you can do after
Operate/configure a Spring Kafka Streams application with managed startup, shutdown, topology creation, and KafkaStreams customization.
How it connects
Connects @EnableKafkaStreams, KafkaStreamsConfiguration, StreamsBuilder, KafkaStreamsCustomizer, and StateListener.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.