Skip to content

Migrate to Netty 4.2 EventLoopGroup and allocator APIs#104

Merged
jaredstehler merged 1 commit intomasterfrom
js-netty-4-2-migration
Mar 25, 2026
Merged

Migrate to Netty 4.2 EventLoopGroup and allocator APIs#104
jaredstehler merged 1 commit intomasterfrom
js-netty-4-2-migration

Conversation

@jaredstehler
Copy link
Copy Markdown
Contributor

Why

Netty 4.2 deprecates NioEventLoopGroup in favor of the new IoHandler-based API (MultiThreadIoEventLoopGroup + NioIoHandler). It also changes the default allocator from PooledByteBufAllocator to AdaptiveByteBufAllocator, which auto-tunes memory usage for the observed workload and integrates better with virtual threads.

Changes

  • Replace NioEventLoopGroup with MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()) in AbstractSmtpSessionFactoryConfig and IntegrationTest
  • Replace PooledByteBufAllocator.DEFAULT with AdaptiveByteBufAllocator.DEFAULT as the default allocator in AbstractSmtpSessionFactoryConfig and IntegrationTest

All 132 tests pass locally (2 pre-existing @Ignore skips unchanged).

NioEventLoopGroup is deprecated in Netty 4.2 in favor of the new
IoHandler-based API. Additionally, the default allocator changed from
PooledByteBufAllocator to AdaptiveByteBufAllocator in 4.2, which
auto-tunes for observed workloads and works better with virtual threads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jaredstehler jaredstehler marked this pull request as ready for review March 25, 2026 16:12
@jaredstehler jaredstehler merged commit e240087 into master Mar 25, 2026
1 check passed
@jaredstehler jaredstehler deleted the js-netty-4-2-migration branch March 25, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant