Skip to content

Commit 23f975a

Browse files
committed
Bump Netty to 4.2.0
References #216
1 parent bfb8607 commit 23f975a

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<stream-client.version>0.24.0-SNAPSHOT</stream-client.version>
4949
<slf4j.version>2.0.17</slf4j.version>
5050
<logback.version>1.5.18</logback.version>
51-
<netty.version>4.1.119.Final</netty.version>
51+
<netty.version>4.2.0.Final</netty.version>
5252
<metrics.version>4.2.30</metrics.version>
5353
<micrometer.version>1.14.5</micrometer.version>
5454
<picocli.version>4.7.6</picocli.version>

src/main/java/com/rabbitmq/stream/perf/StreamPerfTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646
import io.netty.buffer.ByteBufAllocatorMetricProvider;
4747
import io.netty.channel.ChannelOption;
4848
import io.netty.channel.EventLoopGroup;
49-
import io.netty.channel.epoll.EpollEventLoopGroup;
49+
import io.netty.channel.MultiThreadIoEventLoopGroup;
50+
import io.netty.channel.epoll.EpollIoHandler;
5051
import io.netty.channel.epoll.EpollSocketChannel;
51-
import io.netty.channel.nio.NioEventLoopGroup;
52+
import io.netty.channel.nio.NioIoHandler;
5253
import io.netty.handler.ssl.SslContextBuilder;
5354
import io.netty.handler.ssl.SslHandler;
5455
import io.netty.util.internal.PlatformDependent;
@@ -933,10 +934,10 @@ public Integer call() throws Exception {
933934

934935
java.util.function.Consumer<Bootstrap> bootstrapCustomizer;
935936
if (this.nativeEpoll) {
936-
this.eventLoopGroup = new EpollEventLoopGroup();
937+
this.eventLoopGroup = new MultiThreadIoEventLoopGroup(EpollIoHandler.newFactory());
937938
bootstrapCustomizer = b -> b.channel(EpollSocketChannel.class);
938939
} else {
939-
this.eventLoopGroup = new NioEventLoopGroup();
940+
this.eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
940941
bootstrapCustomizer = b -> {};
941942
}
942943

src/test/java/com/rabbitmq/stream/perf/TestUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
import com.rabbitmq.stream.impl.Client;
2323
import io.netty.channel.EventLoopGroup;
24-
import io.netty.channel.nio.NioEventLoopGroup;
24+
import io.netty.channel.MultiThreadIoEventLoopGroup;
25+
import io.netty.channel.nio.NioIoHandler;
2526
import java.lang.annotation.*;
2627
import java.lang.reflect.Field;
2728
import java.lang.reflect.Method;
@@ -234,7 +235,8 @@ static EventLoopGroup eventLoopGroup(ExtensionContext context) {
234235

235236
@Override
236237
public void beforeAll(ExtensionContext context) {
237-
store(context).put("nettyEventLoopGroup", new NioEventLoopGroup());
238+
store(context)
239+
.put("nettyEventLoopGroup", new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()));
238240
}
239241

240242
@Override

0 commit comments

Comments
 (0)