From 15e14e23c99251ba7f750d78e66bcbd12e7f0e9d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 08:22:13 +0100 Subject: [PATCH] Start building against Spring Kafka 2.8.3 snapshots See gh-29759 --- .../ConcurrentKafkaListenerContainerFactoryConfigurer.java | 1 + .../boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java | 2 ++ spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java index ffa5987513f..ef8d008877d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java @@ -169,6 +169,7 @@ public class ConcurrentKafkaListenerContainerFactoryConfigurer { configureContainer(listenerFactory.getContainerProperties()); } + @SuppressWarnings("deprecation") private void configureListenerFactory(ConcurrentKafkaListenerContainerFactory factory) { PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull(); Listener properties = this.properties.getListener(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java index 87050a7ab76..179f0cba884 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java @@ -512,6 +512,7 @@ class KafkaAutoConfigurationTests { } @Test + @Deprecated void testConcurrentKafkaListenerContainerFactoryWithCustomErrorHandler() { this.contextRunner.withBean("errorHandler", ErrorHandler.class, () -> mock(ErrorHandler.class)) .run((context) -> { @@ -522,6 +523,7 @@ class KafkaAutoConfigurationTests { } @Test + @Deprecated void concurrentKafkaListenerContainerFactoryInBatchModeShouldUseBatchErrorHandler() { this.contextRunner.withBean("batchErrorHandler", BatchErrorHandler.class, () -> mock(BatchErrorHandler.class)) .withPropertyValues("spring.kafka.listener.type=batch").run((context) -> { diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 421821f33f5..f8fb23a26d8 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1693,7 +1693,7 @@ bom { ] } } - library("Spring Kafka", "2.8.2") { + library("Spring Kafka", "2.8.3-SNAPSHOT") { group("org.springframework.kafka") { modules = [ "spring-kafka", diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc index 93d337a2e95..3886423d974 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc @@ -42,7 +42,7 @@ The following component creates a listener endpoint on the `someTopic` topic: include::code:MyBean[] If a `KafkaTransactionManager` bean is defined, it is automatically associated to the container factory. -Similarly, if a `RecordFilterStrategy`, `ErrorHandler`, `CommonErrorHandler`, `AfterRollbackProcessor` or `ConsumerAwareRebalanceListener` bean is defined, it is automatically associated to the default factory. +Similarly, if a `RecordFilterStrategy`, `CommonErrorHandler`, `AfterRollbackProcessor` or `ConsumerAwareRebalanceListener` bean is defined, it is automatically associated to the default factory. Depending on the listener type, a `RecordMessageConverter` or `BatchMessageConverter` bean is associated to the default factory. If only a `RecordMessageConverter` bean is present for a batch listener, it is wrapped in a `BatchMessageConverter`.