Skip navigation

Netty 5.0.0.Alpha2 released

We are happy to announce the second Alpha release of the upcoming netty 5.0.0. This release is another big milestone for us and the community, towards the eventual final release of Netty 5. While it is still a long road to the final release we expect things to become more stable with each release and so make it easier for people to keep up-to-date.

These are the major changes since Alpha 1:

  • All protocols and codecs have been migrated to the new buffer API, except HTTP/2, and the compression codecs. These remaining codecs will be migrated later.
  • Support for ByteBuf has been removed from the transports. Codecs and handlers that still rely on ByteBuf must now have a BufferConversionHandler placed in front of them in the pipeline.
  • ByteBuf and related APIs have been removed.
  • To support the uses of ByteBuf that remain in the code base, Alpha 2 now depends on Netty 4.1.75.Final for its ByteBuf implementation. This dependency is temporary and will be removed once everything has been migrated.
  • Write methods on Buffer will now grow the buffer if more capacity is need.
  • A new SensitiveBufferAllocator has been added, which will zero out the memory when buffers are closed.
  • A number of convenience methods have been added to Buffer.

To make it easier to experiment with netty 5 while still use 4.1 at the same time, we have put Netty 5 into its own io.netty5 package. This allows to have both version co-exist at the same time. As this a new major version we also started to introduce breaking changes where it makes sense. These changes were mostly motivation by lessons learned during the life-time of netty 4.1.x. We really hope you enjoy these changes and if not provide feedback in what we should address :)

We will soon start to change the default branch of netty to main and so be more strict about changes that will be accepted for 4.1. While this might sound like a "limitation" it will help to keep the possibility of a regression to a minimum for 4.1. Important bugfixes will of course still be ported to 4.1 as well. With all this said we don't plan to stop supporting 4.1.x any time soon. Both versions will be supported in parallel for now.

To help users to try the next major version of netty we started to write down all the "required" things to do in terms of migrating netty 4.1.x code to 5.0.0. The migration guide can be found on our website.