diff --git a/build.gradle b/build.gradle index 46036ecdfab..f81dd1938f6 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ configure(allprojects) { project -> ext.openjpaVersion = "2.4.0" ext.poiVersion = "3.12" ext.protobufVersion = "2.6.1" - ext.reactorVersion = "2.0.5.RELEASE" + ext.reactorVersion = "2.0.6.BUILD-SNAPSHOT" ext.romeVersion = "1.5.1" ext.seleniumVersion = "2.47.1" ext.slf4jVersion = "1.7.12" @@ -131,6 +131,7 @@ configure(allprojects) { project -> repositories { maven { url "https://repo.spring.io/libs-release" } maven { url "https://repo.spring.io/milestone" } + maven { url "https://repo.spring.io/snapshot" } // reactor 2.0.6 snapshot } dependencies { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpClient.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpClient.java index 78104d7d9fe..ceb563b8c2d 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpClient.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpClient.java @@ -19,9 +19,11 @@ package org.springframework.messaging.tcp.reactor; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Properties; +import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.FutureListener; @@ -76,7 +78,7 @@ public class Reactor2TcpClient

implements TcpOperations

{ public static final Class REACTOR_TCP_CLIENT_TYPE = NettyTcpClient.class; - private final NioEventLoopGroup eventLoopGroup; + private final EventLoopGroup eventLoopGroup; private final TcpClientFactory, Message

> tcpClientSpecFactory; @@ -99,7 +101,10 @@ public class Reactor2TcpClient

implements TcpOperations

{ * @param codec the codec to use for encoding and decoding the TCP stream */ public Reactor2TcpClient(final String host, final int port, final Codec, Message

> codec) { - this.eventLoopGroup = initEventLoopGroup(); + + // Reactor 2.0.5 required NioEventLoopGroup (2.0.6 changed to EventLoopGroup) + final NioEventLoopGroup nioEventLoopGroup = initEventLoopGroup(); + this.eventLoopGroup = nioEventLoopGroup; this.tcpClientSpecFactory = new TcpClientFactory, Message

>() { @Override @@ -108,7 +113,7 @@ public class Reactor2TcpClient

implements TcpOperations

{ .env(new Environment(new SynchronousDispatcherConfigReader())) .codec(codec) .connect(host, port) - .options(new NettyClientSocketOptions().eventLoopGroup(eventLoopGroup)); + .options(new NettyClientSocketOptions().eventLoopGroup(nioEventLoopGroup)); } }; } @@ -244,7 +249,8 @@ public class Reactor2TcpClient

implements TcpOperations

{ @Override public ReactorConfiguration read() { - return new ReactorConfiguration(Arrays.asList(), "sync", new Properties()); + return new ReactorConfiguration(Collections.emptyList(), + "sync", new Properties()); } }