Skip to content

Apply Netty configuration changes to subsequent connections (backport #2133) - #2134

Merged
acogoluegnes merged 1 commit into
v5.xfrom
mergify/bp/v5.x/pr-2133
Oct 19, 2026
Merged

acogoluegnes merged 1 commit into
v5.xfrom
mergify/bp/v5.x/pr-2133

Conversation

@mergify

@mergify mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown

The Netty frame handler factory was created on the first connection and cached for the lifetime of the connection factory. Any later change to the Netty configuration (TLS context, event loop group, customizers, enqueuing timeout) or to the connection timeout, socket configurator, and recovery settings was silently ignored for new connections. This is inconsistent with the blocking IO transport.

The Netty frame handler factory is now created for each connection, like the blocking IO one. Existing connections, including their recovery, keep using the factory they were created with.

ConnectionFactory#clone() also shared the Netty configuration with the original factory. The clone now gets its own copy.


This is an automatic backport of pull request #2133 done by [Mergify](https://mergify.com).

@mergify mergify Bot added the conflicts label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown
Author

Cherry-pick of 8e3ac43 has failed:

On branch mergify/bp/v5.x/pr-2133
Your branch is up to date with 'origin/v5.x'.

You are currently cherry-picking commit 8e3ac43.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/main/java/com/rabbitmq/client/ConnectionFactory.java
	both modified:   src/test/java/com/rabbitmq/client/test/ConnectionFactoryTest.java

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

The Netty frame handler factory was created on the first connection
and cached for the lifetime of the connection factory. Any later
change to the Netty configuration (TLS context, event loop group,
customizers, enqueuing timeout) or to the connection timeout, socket
configurator, and recovery settings was silently ignored for new
connections. This is inconsistent with the blocking IO transport.

The Netty frame handler factory is now created for each connection,
like the blocking IO one. Existing connections, including their
recovery, keep using the factory they were created with.

ConnectionFactory#clone() also shared the Netty configuration with
the original factory. The clone now gets its own copy.

(cherry picked from commit 8e3ac43)

# Conflicts:
#	src/main/java/com/rabbitmq/client/ConnectionFactory.java
#	src/test/java/com/rabbitmq/client/test/ConnectionFactoryTest.java
@acogoluegnes
acogoluegnes force-pushed the mergify/bp/v5.x/pr-2133 branch from 729bb0a to ae77f48 Compare October 19, 2026 08:56
@acogoluegnes acogoluegnes added this to the 5.38.0 milestone Oct 19, 2026
@acogoluegnes
acogoluegnes merged commit 8ea825c into v5.x Oct 19, 2026
4 checks passed
@acogoluegnes
acogoluegnes deleted the mergify/bp/v5.x/pr-2133 branch October 19, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant