Browse Source

Polish "Add transactionIdPrefix Property to KafkaTemplate"

See gh-29089
pull/29200/head
Stephane Nicoll 4 years ago
parent
commit
4799d2a71a
  1. 3
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java
  2. 3
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java

3
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -67,7 +67,6 @@ public class KafkaAutoConfiguration { @@ -67,7 +67,6 @@ public class KafkaAutoConfiguration {
public KafkaTemplate<?, ?> kafkaTemplate(ProducerFactory<Object, Object> kafkaProducerFactory,
ProducerListener<Object, Object> kafkaProducerListener,
ObjectProvider<RecordMessageConverter> messageConverter) {
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
KafkaTemplate<Object, Object> kafkaTemplate = new KafkaTemplate<>(kafkaProducerFactory);
messageConverter.ifUnique(kafkaTemplate::setMessageConverter);

3
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java

@ -825,7 +825,8 @@ public class KafkaProperties { @@ -825,7 +825,8 @@ public class KafkaProperties {
private String defaultTopic;
/**
* Override the transaction id prefix in the producer factory.
* Transaction id prefix, override the transaction id prefix in the producer
* factory.
*/
private String transactionIdPrefix;

Loading…
Cancel
Save