Skip to content

Commit 3df6115

Browse files
committed
java-nsq-client: update netty to 4.1.19.Final
Netty dependency is now updated to 4.1.19.Final as it's used as peer dependencies that are commonly used with the nsq client. Fixes #41
1 parent d0e6612 commit 3df6115

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<dependency>
143143
<groupId>io.netty</groupId>
144144
<artifactId>netty-all</artifactId>
145-
<version>4.0.39.Final</version>
145+
<version>4.1.19.Final</version>
146146
</dependency>
147147

148148
<dependency>
@@ -151,7 +151,7 @@
151151
<version>19.0</version>
152152
</dependency>
153153

154-
<dependency>
154+
<dependency>
155155
<groupId>com.fasterxml.jackson.core</groupId>
156156
<artifactId>jackson-databind</artifactId>
157157
<version>2.6.4</version>
@@ -173,7 +173,7 @@
173173
<dependency>
174174
<groupId>io.netty</groupId>
175175
<artifactId>netty-tcnative</artifactId>
176-
<version>1.1.33.Fork18</version>
176+
<version>2.0.7.Final</version>
177177
<classifier>${os.detected.classifier}</classifier>
178178
<scope>test</scope>
179179
</dependency>

src/main/java/com/github/brainlag/nsq/netty/NSQFeatureDetectionHandler.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import io.netty.channel.ChannelPipeline;
88
import io.netty.channel.SimpleChannelInboundHandler;
99
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
10-
import io.netty.handler.codec.compression.SnappyFramedDecoder;
11-
import io.netty.handler.codec.compression.SnappyFramedEncoder;
10+
import io.netty.handler.codec.compression.SnappyFrameDecoder;
11+
import io.netty.handler.codec.compression.SnappyFrameEncoder;
1212
import io.netty.handler.codec.compression.ZlibCodecFactory;
1313
import io.netty.handler.codec.compression.ZlibWrapper;
1414
import io.netty.handler.ssl.SslHandler;
@@ -59,15 +59,15 @@ protected void channelRead0(final ChannelHandlerContext ctx, final NSQFrame msg)
5959
sslHandler.setSingleDecode(true);
6060
pipeline.addBefore("LengthFieldBasedFrameDecoder", "SSLHandler", sslHandler);
6161
if (snappy) {
62-
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFramedEncoder());
62+
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFrameEncoder());
6363
}
6464
if (deflate) {
6565
pipeline.addBefore("NSQEncoder", "DeflateEncoder", ZlibCodecFactory.newZlibEncoder(ZlibWrapper.NONE,
6666
con.getConfig().getDeflateLevel()));
6767
}
6868
}
6969
if (!ssl && snappy) {
70-
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFramedEncoder());
70+
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFrameEncoder());
7171
reinstallDefaultDecoder = installSnappyDecoder(pipeline);
7272
}
7373
if (!ssl && deflate) {
@@ -102,7 +102,7 @@ private boolean installDeflateDecoder(final ChannelPipeline pipeline, final Conn
102102
private boolean installSnappyDecoder(final ChannelPipeline pipeline) {
103103
finished = true;
104104
LogManager.getLogger(this).info("Adding snappy to pipline");
105-
pipeline.replace("LengthFieldBasedFrameDecoder", "SnappyDecoder", new SnappyFramedDecoder());
105+
pipeline.replace("LengthFieldBasedFrameDecoder", "SnappyDecoder", new SnappyFrameDecoder());
106106
return false;
107107
}
108108

0 commit comments

Comments
 (0)