Upgrade to Kafka 2.6.0

Closes gh-22731
pull/22569/head
Andy Wilkinson 4 years ago
parent a8130da3a3
commit 7f53aef568

@ -16,12 +16,19 @@
package org.springframework.boot.actuate.autoconfigure.metrics;
import java.util.regex.Pattern;
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.KTable;
import org.apache.kafka.streams.kstream.Materialized;
import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafkaStreams;
import org.springframework.kafka.config.StreamsBuilderFactoryBean;
@ -93,6 +100,12 @@ class KafkaMetricsAutoConfigurationTests {
@EnableKafkaStreams
static class EnableKafkaStreamsConfiguration {
@Bean
public KTable<?, ?> table(StreamsBuilder builder) {
KStream<Object, Object> stream = builder.stream(Pattern.compile("test"));
return stream.groupByKey().count(Materialized.as("store"));
}
}
}

@ -18,9 +18,14 @@ package org.springframework.boot.autoconfigure.kafka;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import org.apache.kafka.clients.admin.NewTopic;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.KTable;
import org.apache.kafka.streams.kstream.Materialized;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@ -124,6 +129,12 @@ class KafkaAutoConfigurationIntegrationTests {
@EnableKafkaStreams
static class KafkaStreamsConfig {
@Bean
public KTable<?, ?> table(StreamsBuilder builder) {
KStream<Object, Object> stream = builder.stream(Pattern.compile("test"));
return stream.groupByKey().count(Materialized.as("store"));
}
}
static class Listener {

@ -892,7 +892,7 @@ bom {
]
}
}
library("Kafka", "2.5.0") {
library("Kafka", "2.6.0") {
group("org.apache.kafka") {
modules = [
"connect-api",

Loading…
Cancel
Save