diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/interceptors.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/interceptors.adoc index 2d96b135db..b2a3ae1728 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/interceptors.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/interceptors.adoc @@ -30,11 +30,9 @@ public class Application { Map producerProperties = new HashMap<>(); // producerProperties.put(..., ...) // ... - Map producerProperties = properties.buildProducerProperties(); producerProperties.put(ProducerConfig.INTERCEPTOR_CLASSES_CONFIG, MyProducerInterceptor.class.getName()); producerProperties.put("some.bean", someBean); - DefaultKafkaProducerFactory factory = new DefaultKafkaProducerFactory<>(producerProperties); - return factory; + return new DefaultKafkaProducerFactory<>(producerProperties); } @Bean