Upgrade to Spring Integration 6.2.0
* Upgrade all other dependencies * Fix deprecation warnings * Fix Ruby script to a newer syntax
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.integration.samples</groupId>
|
||||
<artifactId>kafka</artifactId>
|
||||
<version>6.1.0</version>
|
||||
<version>6.2.0</version>
|
||||
<packaging>jar</packaging>
|
||||
<url>https://github.com/spring-projects/spring-integration-samples</url>
|
||||
<organization>
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.20.0</version>
|
||||
<version>2.21.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -95,7 +95,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<version>5.7.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -134,240 +134,245 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-file</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-syslog</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-smb</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-jdbc</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-jmx</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-ws</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-redis</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-r2dbc</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-webflux</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-sftp</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-rsocket</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-mqtt</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-event</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-ftp</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-kafka</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-groovy</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-cassandra</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-scripting</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-xmpp</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-websocket</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-graphql</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-feed</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-debezium</artifactId>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-jpa</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-test</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-zeromq</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-http</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-zookeeper</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-ip</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-hazelcast</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-test-support</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-amqp</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-mail</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-security</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-camel</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-xml</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-core</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-zip</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-jms</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-mongodb</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-stream</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-stomp</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>3.1.1-SNAPSHOT</version>
|
||||
<version>3.2.0-SNAPSHOT</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit</groupId>
|
||||
<artifactId>junit-bom</artifactId>
|
||||
<version>5.9.3</version>
|
||||
<version>5.10.1</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson</groupId>
|
||||
<artifactId>jackson-bom</artifactId>
|
||||
<version>2.15.0</version>
|
||||
<version>2.15.3</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>6.0.11</version>
|
||||
<version>6.1.0</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-bom</artifactId>
|
||||
<version>6.1.3</version>
|
||||
<version>6.2.0</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
@@ -387,7 +392,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.1.1-SNAPSHOT</version>
|
||||
<version>3.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2018 the original author or authors.
|
||||
* Copyright 2015-2023 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.
|
||||
@@ -57,6 +57,8 @@ import org.springframework.messaging.support.GenericMessage;
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 4.2
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@@ -66,7 +68,7 @@ public class Application {
|
||||
@Autowired
|
||||
private KafkaAppProperties properties;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
public static void main(String[] args) {
|
||||
ConfigurableApplicationContext context
|
||||
= new SpringApplicationBuilder(Application.class)
|
||||
.web(WebApplicationType.NONE)
|
||||
@@ -107,7 +109,7 @@ public class Application {
|
||||
|
||||
@Bean
|
||||
public ProducerFactory<?, ?> kafkaProducerFactory(KafkaProperties properties) {
|
||||
Map<String, Object> producerProperties = properties.buildProducerProperties();
|
||||
Map<String, Object> producerProperties = properties.buildProducerProperties(null);
|
||||
producerProperties.put(ProducerConfig.LINGER_MS_CONFIG, 1);
|
||||
return new DefaultKafkaProducerFactory<>(producerProperties);
|
||||
}
|
||||
@@ -123,8 +125,7 @@ public class Application {
|
||||
|
||||
@Bean
|
||||
public ConsumerFactory<?, ?> kafkaConsumerFactory(KafkaProperties properties) {
|
||||
Map<String, Object> consumerProperties = properties
|
||||
.buildConsumerProperties();
|
||||
Map<String, Object> consumerProperties = properties.buildConsumerProperties(null);
|
||||
consumerProperties.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, 15000);
|
||||
return new DefaultKafkaConsumerFactory<>(consumerProperties);
|
||||
}
|
||||
@@ -171,8 +172,8 @@ public class Application {
|
||||
private KafkaProperties kafkaProperties;
|
||||
|
||||
public void addAnotherListenerForTopics(String... topics) {
|
||||
Map<String, Object> consumerProperties = kafkaProperties.buildConsumerProperties();
|
||||
// change the group id so we don't revoke the other partitions.
|
||||
Map<String, Object> consumerProperties = kafkaProperties.buildConsumerProperties(null);
|
||||
// change the group id, so we don't revoke the other partitions.
|
||||
consumerProperties.put(ConsumerConfig.GROUP_ID_CONFIG,
|
||||
consumerProperties.get(ConsumerConfig.GROUP_ID_CONFIG) + "x");
|
||||
IntegrationFlow flow =
|
||||
|
||||
Reference in New Issue
Block a user