diff --git a/build.gradle b/build.gradle index af995fe59c..71016c2622 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ ext { micrometerVersion = '1.12.0-RC1' micrometerTracingVersion = '1.2.0-RC1' mockitoVersion = '5.5.0' - rabbitmqStreamVersion = '0.12.0' + rabbitmqStreamVersion = '0.14.0' rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '5.18.0' reactorVersion = '2023.0.0-RC1' snappyVersion = '1.1.8.4' diff --git a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/RabbitListenerTests.java b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/RabbitListenerTests.java index f1d847d849..c418c0ecfd 100644 --- a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/RabbitListenerTests.java +++ b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/RabbitListenerTests.java @@ -61,7 +61,6 @@ import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.util.UriUtils; -import com.rabbitmq.stream.Address; import com.rabbitmq.stream.Environment; import com.rabbitmq.stream.Message; import com.rabbitmq.stream.MessageHandler.Context; @@ -75,6 +74,7 @@ /** * @author Gary Russell + * @author Artem Bilan * @since 2.4 * */ @@ -203,7 +203,7 @@ ObservationRegistry obsReg(MeterRegistry meterRegistry) { @Bean static Environment environment() { return Environment.builder() - .addressResolver(add -> new Address("localhost", streamPort())) + .port(streamPort()) .build(); } @@ -395,6 +395,6 @@ Queue queue() { .build(); } - } + } } diff --git a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamConcurrentSACTests.java b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamConcurrentSACTests.java index 40e7fdbada..c7d34dd83e 100644 --- a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamConcurrentSACTests.java +++ b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamConcurrentSACTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-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. @@ -39,12 +39,12 @@ import org.springframework.rabbit.stream.config.SuperStream; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; -import com.rabbitmq.stream.Address; import com.rabbitmq.stream.Environment; import com.rabbitmq.stream.OffsetSpecification; /** * @author Gary Russell + * @author Artem Bilan * @since 3.0 * */ @@ -105,7 +105,7 @@ SuperStream superStream() { @Bean static Environment environment() { return Environment.builder() - .addressResolver(add -> new Address("localhost", streamPort())) + .port(streamPort()) .maxConsumersByConnection(1) .build(); } diff --git a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamSACTests.java b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamSACTests.java index 595e18cb5b..1daaca2d33 100644 --- a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamSACTests.java +++ b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/listener/SuperStreamSACTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-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. @@ -47,12 +47,12 @@ import org.springframework.rabbit.stream.config.SuperStream; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; -import com.rabbitmq.stream.Address; import com.rabbitmq.stream.Environment; import com.rabbitmq.stream.OffsetSpecification; /** * @author Gary Russell + * @author Artem Bilan * @since 3.0 * */ @@ -122,7 +122,7 @@ SuperStream superStream() { @Bean static Environment environment() { return Environment.builder() - .addressResolver(add -> new Address("localhost", streamPort())) + .port(streamPort()) .build(); } diff --git a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/micrometer/TracingTests.java b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/micrometer/TracingTests.java index bd93149e61..a90eb4ac7c 100644 --- a/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/micrometer/TracingTests.java +++ b/spring-rabbit-stream/src/test/java/org/springframework/rabbit/stream/micrometer/TracingTests.java @@ -38,7 +38,6 @@ import org.springframework.rabbit.stream.producer.RabbitStreamTemplate; import org.springframework.rabbit.stream.support.StreamAdmin; -import com.rabbitmq.stream.Address; import com.rabbitmq.stream.Environment; import com.rabbitmq.stream.Message; import com.rabbitmq.stream.OffsetSpecification; @@ -51,6 +50,7 @@ /** * @author Gary Russell + * @author Artem Bilan * @since 3.0.5 * */ @@ -106,7 +106,7 @@ public static class Config { @Bean static Environment environment() { return Environment.builder() - .addressResolver(add -> new Address("localhost", AbstractTestContainerTests.streamPort())) + .port(AbstractTestContainerTests.streamPort()) .build(); }