Skip to content

Commit 0ab1b94

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 0ab1b94

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
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.SnappyFrameEncoder;
1011
import io.netty.handler.codec.compression.SnappyFramedDecoder;
1112
import io.netty.handler.codec.compression.SnappyFramedEncoder;
1213
import io.netty.handler.codec.compression.ZlibCodecFactory;
@@ -59,15 +60,15 @@ protected void channelRead0(final ChannelHandlerContext ctx, final NSQFrame msg)
5960
sslHandler.setSingleDecode(true);
6061
pipeline.addBefore("LengthFieldBasedFrameDecoder", "SSLHandler", sslHandler);
6162
if (snappy) {
62-
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFramedEncoder());
63+
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFrameEncoder());
6364
}
6465
if (deflate) {
6566
pipeline.addBefore("NSQEncoder", "DeflateEncoder", ZlibCodecFactory.newZlibEncoder(ZlibWrapper.NONE,
6667
con.getConfig().getDeflateLevel()));
6768
}
6869
}
6970
if (!ssl && snappy) {
70-
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFramedEncoder());
71+
pipeline.addBefore("NSQEncoder", "SnappyEncoder", new SnappyFrameEncoder());
7172
reinstallDefaultDecoder = installSnappyDecoder(pipeline);
7273
}
7374
if (!ssl && deflate) {

0 commit comments

Comments
 (0)