Skip to content

Add support for Netty 4.2.x #6757

Open
Open

Description

@samarprakash

Describe the bug

When upgrading an application stack to Netty 4.2.x and Reactor Netty 1.3.x, the AWS SDK v2 netty-nio-client fails when providing a Netty 4.2-style EventLoopGroup (e.g. MultiThreadIoEventLoopGroup).

The failure occurs because SdkEventLoopGroup create does not recognize MultiThreadIoEventLoopGroup (Netty 4.2 model) and throws:

IllegalArgumentException: Unknown event loop group : class io.netty.channel.MultiThreadIoEventLoopGroup

This suggests that netty-nio-client still expects 4.1-style EpollEventLoopGroup or NioEventLoopGroup.

So few Key Questions

  • Does AWS SDK v2 officially support Netty 4.2.x?
  • If not:
    - Is there a roadmap to support 4.2?
    - Is there an estimated release version?
  • If yes:
    - Which AWS SDK version should be used?
    - What is the correct way to provide a 4.2-style IoEventLoopGroup?
  • Is there a recommended compatibility matrix between:
    - AWS SDK v2
    - Netty

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

If AWS SDK v2 supports Netty 4.2.x:

  • SdkEventLoopGroup create should accept IoEventLoopGroup / MultiThreadIoEventLoopGroup
  • OR documentation should clearly state that Netty 4.2.x is not supported

Current Behavior

Only 4.1-style groups are supported:

  • EpollEventLoopGroup
  • KQueueEventLoopGroup
  • NioEventLoopGroup

IoEventLoopGroup (4.2 model) is not recognized.

Reproduction Steps

  • Create Netty 4.2 EventLoopGroup
@Bean
public EventLoopGroup eventLoopGroup() {
    return new MultiThreadIoEventLoopGroup(
        8,
        NioIoHandler.newFactory()
    );
}
  • Provide it to AWS SDK
@Bean
public SdkEventLoopGroup sdkEventLoopGroup(EventLoopGroup eventLoopGroup) {
    return SdkEventLoopGroup.create(
        eventLoopGroup,
        NioSocketChannel::new
    );
}
  • Result
IllegalArgumentException:
Unknown event loop group :
class io.netty.channel.MultiThreadIoEventLoopGroup

Possible Solution

  • Add support for Netty 4.2 IoEventLoopGroup

    • Detect IoEventLoopGroup / MultiThreadIoEventLoopGroup
    • Allow user-provided ChannelFactory without strict type checking
    • Avoid instanceof checks tied to 4.1-only classes
  • Provide explicit documentation

    • Clearly state that Netty 4.2.x is not supported
    • Provide an official compatibility matrix
  • Introduce version-aware factory logic

    • If Netty 4.2 detected, use generic ChannelFactory
    • Avoid relying on concrete EventLoopGroup subclass checks

At minimum, clarification on official Netty 4.2 support status would help users avoid runtime incompatibilities during upgrades.

Additional Information/Context

Netty 4.2 introduces the new IoHandler model and deprecates:
EpollEventLoopGroup, KQueueEventLoopGroup, NioEventLoopGroup
Frameworks such as Reactor Netty 1.3.x are beginning to align with 4.2 APIs.

This creates a compatibility gap for applications using: Spring WebFlux / Reactor Netty, AWS SDK v2 async clients, Shared EventLoopGroups for IO optimization

Currently, users must either - Downgrade Netty to 4.1.x Or use deprecated EventLoopGroup implementations

Clarification on official support would help prevent production incompatibilities.

The incompatibility appears to stem from SdkEventLoopGroup performing instance checks against legacy EventLoopGroup types.

AWS Java SDK version used

V2 SDK (group ID software.amazon.awssdk) - 2.42.4

JDK version used

Java 21

Operating System and version

Linux (Epoll available)

Activity

  1. added
    bugThis issue is a bug.
    needs-triageThis issue or PR still needs to be triaged.
    on Mar 1, 2026
  2. debora-ito commented on Mar 6, 2026

    @debora-ito
    Member

    Hi @samarprakash

    <netty.version>4.1.130.Final</netty.version>

    The latest Java SDK version uses Netty 4.1.130, but we have plans to upgrade to 4.2.x and we're aware of the changes required to support it. Tracking in PR: #6205.

    We are currently working to remove some blockers to merge the PR, will post updates here when we have any.

  3. added
    p2This is a standard priority issue
    and removed
    needs-triageThis issue or PR still needs to be triaged.
    on Mar 6, 2026
  4. dragonsahead commented on Apr 14, 2026

    @dragonsahead

    Can you turn this into a P1? old Netty versions have vulnerabilities that need to be solved in order to deploy software in a production environment

  5. debora-ito commented on Apr 14, 2026

    @debora-ito
    Member

    @dragonsahead the latest Java SDK version uses Netty 4.1.132.Final and doesn't show any vulnerabilities. Are you able to upgrade to the latest SDK version?

  6. dragonsahead commented on Apr 15, 2026

    @dragonsahead

    We can’t use 4.1 due to other driver we have that need 4.2

  7. mseidel commented on Apr 15, 2026

    @mseidel

    Spring Boot 4 just released with Netty 4.2 so that alone will break a ton of stuff

  8. cmcclung-ANGENG commented on May 1, 2026

    @cmcclung-ANGENG

    You don't have to use the new MultiThreadIoEventLoopGroup, can you use the old APIs ie

    EventLoopGroup group = new NioEventLoopGroup();

    On the sdk side moving to 4.2.x makes sense but wait for 4.2.13

  9. fdubuisson-betclic commented on May 18, 2026

    @fdubuisson-betclic

    Netty 4.2.13 was released 2 weeks ago so is there an ETA for its integration in the SDK ?
    Many frameworks have updated and are now conflicting with the SDK (in our case, the Ktor framework)

  10. guillaume-verdon-sword commented on Jun 24, 2026

    @guillaume-verdon-sword

    Hello everyone,

    Springboot 3 will be out of open source support very soon.

    Image https://endoflife.date/spring-boot

    As mentionned above, Springboot 4 now relies on Netty 4.2 which is not binary compatible with Netty 4.1.

    If my understanding is correct, it will soon be impossible to use both a supported version of AWS SDK and a supported version of Springboot.

    @debora-ito I suggest raising the priority for this bug to P1 before this ticking bomb hits everyone.

    Regards,
    Guillaume

  11. stewue commented on Aug 10, 2026

    @stewue

    any updates on this one?

  12. paulodoh27-sketch commented on Aug 10, 2026

    @paulodoh27-sketch

    Launch thread application launcher on chain

  13. cmcclung-ANGENG commented on Aug 10, 2026

    @cmcclung-ANGENG

    For visibility Netty is going towards a 5.0 release at some point and has started to discuss EOL for 4.1

    So doing some work towards supporting a few versions might be a good idea

  14. vstamate commented on Aug 23, 2026

    @vstamate

    In the same manner, Spring Boot 4 and Gatling 3.15.0 uses netty 4.2.

  15. changed the title [-]AWS SDK v2 netty-nio-client incompatible with Netty 4.2.x IoEventLoopGroup (MultiThreadIoEventLoopGroup not recognized)[/-] [+]Add support for Netty 4.2.x[/+] on Sep 9, 2026
  16. sandeepvinayak commented on Oct 5, 2026

    @sandeepvinayak

    @debora-ito @zoewangg This came up during the upgrade to spring boot 4 at our organization, I think at this moment upgrade to netty 4.2 should be treated as P1/P0 for aws java v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions