-
Notifications
You must be signed in to change notification settings - Fork 584
Add Netty-based frame handler #1663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Better performance? |
Early tests with a simplistic workload showed a 10% increase in throughput but increased latency (compared to blocking IO). With a limited rate 10 K msg / s, the latency is comparable to the blocking IO. The goal is to make Netty the default (and maybe only) IO layer. This way we could get rid of a significant amount of code (our NIO layer) and benefit from Netty flexibility (NIO by default, but also native IO options). |
This commit adds a Netty-based frame handler. All network IO are based on Netty when this frame handler is in use. The client library can benefit of all the flexibility and advantages of Netty: simple API, pluggable IO layer (Java NIO by default, or e.g. native Epoll on Linux). The Netty frame handler deprecates the internal one using Java NIO. The blocking IO frame handler is still the default one in 5.x. The Netty frame handler should be the only one in 6.x. Fixes #1664
6caf2a8
to
74f538d
Compare
This commit adds support for the Netty-based frame handler that was added in RabbitMQ AMQP 091 Java client 5.27.0. New options: * --netty: to activate Netty with the defaults * --netty-threads: to set the number of threads used in the event loop * --netty-epoll: to use the native epoll support (Linux x86-64) * --netty-kqueue: to use the native kqueue support (macOS aarch64) This change also deprecates the options related to Java NIO. References rabbitmq/rabbitmq-java-client#1663 Fixes #856
Part of the back-pressure mechanism. References #1663
Having a method like useNetty() is not necessary as netty() activates Netty as well. Moreover useNetty() does not allow to set the EventLoopGroup, which is essential to configure when using Netty. References #1663 (cherry picked from commit aed8d84) Conflicts: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Having a method like useNetty() is not necessary as netty() activates Netty as well. Moreover useNetty() does not allow to set the EventLoopGroup, which is essential to configure when using Netty. References #1663
No description provided.