After over 2 years after the first release of a 4.1.0 Beta I am happy to announce the release of the next stable minor Netty version a.k.a 4.1.0.Final! All the hard work finally payed off ;)

This release contains a lot of new stuff compared to 4.0.x, mostly in terms of new codecs but also other enhancements.

Most notable features are:

codec-dns : Support for encode and decode DNS packets.

codec-http2 : Support for HTTP/2.

codec-memcached : Support for Memcached binary protocol.

codec-mqtt : Support for MQTT

codec-redis : Support for Redis protocol.

codec-smtp : Support for SMTP protocol (only client side atm).

codec-stomp : Support for Stomp.

handler-proxy : Support for bulding proxies.

resolver-dns : Alternative DNS resolver that is non-blocking and is using codec-dns.

resolver : Resolver interfaces.

For the details and all changes, please browse our issue tracker and look for all 4.1.0.x releases.

Experimental APIs

With this release we also introduce a new annotation ( @UnstableApi ) that we will use in the future to mark certain APIs as unstable, and so should be free to change these at any time. This will allow us to provide certain features to users earlier while still be able to make slightly changes when needed.

Notable changes

As stated there are lot of changes, following are the more important for the "general" user, which are not related to new codecs.

Default ByteBufAllocator

The default used ByteBufAllocator was changed to PooledByteBufAllocator . So if you want to use UnpooledByteBufAllocator you need to explicit configure it.

Resolving during Bootstrap.connect(...)

With this release of Netty you can make use of resolver-dns which contains a fully asynchronous DNS resolver. This can be configure on the Bootstrap and so allow to make the full DNS resolution during the connect non-blocking.

Using it is as simple as:

DnsAddressResolverGroup resolverGroup = new DnsAddressResolverGroup( NioDatagramChannel.class, DnsServerAddress.defaultAddressList()); NioEventLoopGroup group = new NioEventLoopGroup(); Bootstrap bs = new Bootstrap() .group(group) .resolver(resolverGroup) .handler(....); ChannelFuture future = bs.connect(InetSocketAddress.createUnresolved("netty.io", 80)); ...

By default it will use the JDK name resolution, just as before, which is blocking :(

Thank You

We would like to thank all of you who helped us improve Netty over the past years. No matter if it was through bug-reports, PRs, questions or feedback. Without you, the community, Netty would have not be possible!