Skip to content

Commit 7cb0ff8

Browse files
committed
Fix compatibility with current Kafka Client
1 parent 2f62205 commit 7cb0ff8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-kafka/src/test/java/org/springframework/kafka/listener/DefaultErrorHandlerSeekAfterCommitExceptionBatchAckTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public ConsumerFactory consumerFactory() {
149149
ConsumerFactory consumerFactory = mock(ConsumerFactory.class);
150150
final Consumer consumer = consumer();
151151
given(consumerFactory.createConsumer("grp", "", "-0", KafkaTestUtils.defaultPropertyOverrides()))
152-
.willReturn(consumer);
152+
.willReturn(consumer);
153153
return consumerFactory;
154154
}
155155

@@ -226,7 +226,7 @@ ConcurrentKafkaListenerContainerFactory kafkaListenerContainerFactory() {
226226
factory.setConsumerFactory(consumerFactory());
227227
factory.getContainerProperties().setAckMode(AckMode.BATCH);
228228
factory.getContainerProperties().setDeliveryAttemptHeader(true);
229-
factory.setRecordInterceptor((record, consumer) -> {
229+
factory.setRecordInterceptor((record) -> {
230230
Config.this.deliveryAttempt = record.headers().lastHeader(KafkaHeaders.DELIVERY_ATTEMPT);
231231
return record;
232232
});

spring-kafka/src/test/java/org/springframework/kafka/listener/DefaultErrorHandlerSeekAfterCommitExceptionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public ConsumerFactory consumerFactory() {
149149
ConsumerFactory consumerFactory = mock(ConsumerFactory.class);
150150
final Consumer consumer = consumer();
151151
given(consumerFactory.createConsumer("grp", "", "-0", KafkaTestUtils.defaultPropertyOverrides()))
152-
.willReturn(consumer);
152+
.willReturn(consumer);
153153
return consumerFactory;
154154
}
155155

@@ -226,7 +226,7 @@ ConcurrentKafkaListenerContainerFactory kafkaListenerContainerFactory() {
226226
factory.setConsumerFactory(consumerFactory());
227227
factory.getContainerProperties().setAckMode(AckMode.RECORD);
228228
factory.getContainerProperties().setDeliveryAttemptHeader(true);
229-
factory.setRecordInterceptor((record, consumer) -> {
229+
factory.setRecordInterceptor((record) -> {
230230
Config.this.deliveryAttempt = record.headers().lastHeader(KafkaHeaders.DELIVERY_ATTEMPT);
231231
return record;
232232
});

0 commit comments

Comments
 (0)