1. Theme
1.1. Configure the theme
- Define a KafkaAdmin Bean in the application context that automatically adds topics to the broker.
Through this Bean , each newly created topic can be added to the application context. Here's a simple example:
You can also create a TopicBuilder class, which makes it easier to create beans.
@Bean
public KafkaAdmin admin() {
Map<String, Object> configs =