Questions tagged [netty]

An open source asynchronous event-driven network application framework written in Java. It is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients

Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.

If you have a question about using Netty in your network application, this is the tag you should use.

Useful Links

  • Netty home page provides a user guide, JavaDoc, and various examples. Please make sure to read the user guide before posting a question. Otherwise you have a very high chance of asking a trivial question.
  • User mailing list archive contains a number of questions and answers related with Netty. If you failed to find the answer for your question, you might want to search this archive before posting the question at StackOverflow.
  • Wikipedia page

Using as a dependency in a maven project

Netty can be used in combination with the dependency system from maven.

Depending on your use case, you can either include "netty-all", or add all the modules you use separately. The following examples give an example how to use netty-all in combination with maven.

The following should be placed under the <dependencies> tag in .

Latest SNAPSHOT

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>5.0.0.Alpha3-SNAPSHOT</version>
</dependency>

Latest Beta

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>5.0.0.Alpha3</version>
</dependency>

Latest Alpha

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>4.1.0.Beta8</version>
</dependency>

Latest Final

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>4.0.35.Final</version>
</dependency>
4961 questions
1
vote
1 answer

Handling received messages directly in the Client (using nio trough the netty-framework)

I have made an client - server example using netty. I have defined handlers for the server and the client. Basically I connect with the client to the server and send some messages. Every received message gets send back (with the content of the…
c3p0
  • 35
  • 5
1
vote
0 answers

How to get sleuth http headers for reactor netty client request via breakpoint?

Given a client request of the form return webClient.get() .uri(customersUrl + id) .retrieve() .bodyToMono(Customer.class) .block(); I would like to have a scriptable breakpoint at some place in the outgoing request where I can…
1
vote
1 answer

How to turn off Netty library debug output using SLF4J programmatically?

Hello all i have a simple task I am using netty for some server-client tasks. My problem is that netty produces a huge amount of debugging info that i don't want in my app. Does anyone know how to turn this off? I really don't need to see this…
Panagiotis Drakatos
  • 2,851
  • 4
  • 31
  • 43
1
vote
1 answer

Is it possible to run Quarkus in native mode with reactive SQL client connecting to Google Cloud SQL?

Is it possible to run Quarkus in native mode with reactive SQL client connecting to Google Cloud SQL? This guide says that would require Netty native transport which according to this issue doesn't work in native mode. Is there some other option…
iskhakovt
  • 458
  • 4
  • 13
1
vote
0 answers

io.netty.util.IllegalReferenceCountException: refCnt: 0 throws while invoking PacketByteBuf.readFloat in minecraft 1.16.5

I am trying to create a temperature system in my mod, and I synchronize temperature data (2 floats) with Fabric Networking API. Packets are created with these codes. // Temperature.java private float ambient; private float biome; public…
asablock
  • 11
  • 1
1
vote
1 answer

Read timeout for kubernetes Micronaut Java application

I have currently deployed a small java application to my local Kubernetes cluster. I'm currently trying to test my application by port-forwarding the pod and then using postman to test my Controllers. However, when I am testing I am getting a read…
1
vote
1 answer

Karate 1.3.0.RC1 - Could not find netty-resolver-dns-native-macos-4.1.66.Final-osx-aarch_64.jar

Has anyone tried migrating their karate application to use the 1.3.0 version? I tried migrating to 1.3.0.RC1 but I'm encountering this error when I build: Could not find netty-resolver-dns-native-macos-4.1.66.Final-osx-aarch_64.jar…
1
vote
0 answers

Spring mvc by pass stream to another server

I have 2 web app using spring mvc in different location, here's some info: 1. server A: - have ip public 2. server B: - no ip public 3. Client: - want to access server B via server A using browser Diagram: Client …
JavaNewbie
  • 11
  • 1
1
vote
2 answers

Find out all java code places where a blocking operation happens

In our Netty application. We are moving all blocking calls in our code to run in a special backgroundThreadGroup. I'd like to be able to log in production the threadName and the lineNumber of the java code that is about to execute a blocking…
David Hofmann
  • 5,683
  • 12
  • 50
  • 78
1
vote
0 answers

Stomp websocket gives ByteBuf.release() was not called before it's garbage-collected

I have been working with stomp and sockjs for sometime. The following error occurred in the logs for stomp. 05:49:52.704 [71] [tcp-client-loop-nio-2] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's…
pacman
  • 725
  • 1
  • 9
  • 28
1
vote
1 answer

Micronaut keep data http response compressed

I am hitting a REST server that is exposing a GET endpoint with headers Content-Encoding = gzip and Content-Type = application/json, so the server compresses the data before sending the response. I am trying to make a sort of backup on S3 of…
1
vote
0 answers

when I use netty ctx.writeAndFlush(),the client does not receive a response

Java development, using netty's channel When writeandflush is executed in a new thread, the client does not receive a response; It can be received when executed in the normal method private READER_ERR initReader() { //not receive new…
ylq5848409
  • 11
  • 2
1
vote
0 answers

how to monitor EventLoop's I/O thread

I have a server built with Netty. Recently i encounter an issue may caused by I/O thread blocking. I tried to add a LoggingHanlder to the pipeline, socketChannel.pipeline().addLast(new LoggingHandler(LogLevel.TRACE)) and figure out the eventloop's…
william
  • 103
  • 7
1
vote
1 answer

Springboot may conflict with integrating netty and rabbitmq at the same time, causes @RabbitListener to not take effect

Some important maven dependencies org.springframework.boot spring-boot-starter-parent 2.2.1.RELEASE