Upgrade to Spring Kafka 2.8.3

Closes gh-29722
pull/30004/head
Stephane Nicoll 3 years ago
parent 880db30c67
commit c8b7a17545

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -169,6 +169,7 @@ public class ConcurrentKafkaListenerContainerFactoryConfigurer {
configureContainer(listenerFactory.getContainerProperties()); configureContainer(listenerFactory.getContainerProperties());
} }
@SuppressWarnings("deprecation")
private void configureListenerFactory(ConcurrentKafkaListenerContainerFactory<Object, Object> factory) { private void configureListenerFactory(ConcurrentKafkaListenerContainerFactory<Object, Object> factory) {
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull(); PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
Listener properties = this.properties.getListener(); Listener properties = this.properties.getListener();

@ -508,6 +508,7 @@ class KafkaAutoConfigurationTests {
} }
@Test @Test
@Deprecated
void testConcurrentKafkaListenerContainerFactoryWithCustomErrorHandler() { void testConcurrentKafkaListenerContainerFactoryWithCustomErrorHandler() {
this.contextRunner.withBean("errorHandler", ErrorHandler.class, () -> mock(ErrorHandler.class)) this.contextRunner.withBean("errorHandler", ErrorHandler.class, () -> mock(ErrorHandler.class))
.run((context) -> { .run((context) -> {
@ -518,6 +519,7 @@ class KafkaAutoConfigurationTests {
} }
@Test @Test
@Deprecated
void concurrentKafkaListenerContainerFactoryInBatchModeShouldUseBatchErrorHandler() { void concurrentKafkaListenerContainerFactoryInBatchModeShouldUseBatchErrorHandler() {
this.contextRunner.withBean("batchErrorHandler", BatchErrorHandler.class, () -> mock(BatchErrorHandler.class)) this.contextRunner.withBean("batchErrorHandler", BatchErrorHandler.class, () -> mock(BatchErrorHandler.class))
.withPropertyValues("spring.kafka.listener.type=batch").run((context) -> { .withPropertyValues("spring.kafka.listener.type=batch").run((context) -> {

@ -1673,7 +1673,7 @@ bom {
] ]
} }
} }
library("Spring Kafka", "2.8.2") { library("Spring Kafka", "2.8.3") {
group("org.springframework.kafka") { group("org.springframework.kafka") {
modules = [ modules = [
"spring-kafka", "spring-kafka",

@ -48,7 +48,7 @@ include::{docs-java}/messaging/kafka/receiving/MyBean.java[]
---- ----
If a `KafkaTransactionManager` bean is defined, it is automatically associated to the container factory. 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. 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`. If only a `RecordMessageConverter` bean is present for a batch listener, it is wrapped in a `BatchMessageConverter`.

Loading…
Cancel
Save