Skip to content

By @Ayanda-D: Multiple channel interceptors, with a core team follow-up (backport #17182) - #17188

Open
mergify[bot] wants to merge 19 commits into
v4.3.xfrom
mergify/bp/v4.3.x/pr-17182
Open

By @Ayanda-D: Multiple channel interceptors, with a core team follow-up (backport #17182)#17188
mergify[bot] wants to merge 19 commits into
v4.3.xfrom
mergify/bp/v4.3.x/pr-17182

Conversation

@mergify

@mergify mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown

This is #16046 by @Ayanda-D and other contributors, plus a few tweaks from me, mostly around naming, test coverage and edge case handling.

Backporting

Backport PR must wait for the 4.3.5 release to ship first.


This is an automatic backport of pull request #17182 done by Mergify.

Ayanda-D and others added 19 commits August 15, 2026 00:53
using different configured priority levels. Only disallow channel
interceptors for the same AMQP operation when they have the same
configured priority level.

(cherry picked from commit 8847a37)
(cherry picked from commit d500ce1)

# Conflicts:
#	deps/rabbit/test/channel_interceptor_SUITE.erl
channel interceptors with their configured meta information

(cherry picked from commit cc90446)
rabbit/src with behaviour dependencies

(cherry picked from commit 4efc635)
to set priority levels for channel interceptor (modules)

(cherry picked from commit af030be)
and update/fix manual merge update

(cherry picked from commit 2b9101d)
and optimize application:get_env/1 lookups to be only called once before
comparing priorities in init/1 and listing in list/0

(cherry picked from commit dc0a521)
to clarify that interceptor priorities set are not persisted
and will not survive node restarts

(cherry picked from commit 3323180)
only terminate list/0 for any other non-channel interceptor module
causing a crash. also update formatting for error messages to be
more detailed to include 'priority, modules and operations' on
conflicting interceptors.

(cherry picked from commit dcde0c7)
to list of  ENABLED_PLUGINS in rabbitmq_cli/Makefile to register
the rabbit_sharding_interceptor on the running node ensuring a real,
loaded channel interceptor is available for CLI tests.

(cherry picked from commit bbedbd0)
…tered interceptor at boot

(cherry picked from commit 1c04fb5)
error responses to {:validation_failure, {:bad_argument, _}} to
ensure these exit with 65 and print usage

(cherry picked from commit 6a43bea)
…g dummy_interceptor back to /test)

(cherry picked from commit df93d49)
 * Use a `rabbitmq.conf` key naming consistent with
   the existing keys
 * Handle a few edge cases
 * Add more tests

(cherry picked from commit b29b6e6)

# Conflicts:
#	deps/rabbit/test/channel_interceptor_SUITE.erl
A `meck`-based version turned out to be simpler.

(cherry picked from commit 13e2b6d)
@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Author

Cherry-pick of d500ce1 has failed:

On branch mergify/bp/v4.3.x/pr-17182
Your branch is ahead of 'origin/v4.3.x' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit d500ce152a.
  (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)

Changes to be committed:
	new file:   deps/rabbit/test/dummy_interceptor_priority_1.erl
	new file:   deps/rabbit/test/dummy_interceptor_priority_1_conflict.erl
	new file:   deps/rabbit/test/dummy_interceptor_priority_2.erl
	new file:   deps/rabbit/test/dummy_interceptor_priority_3.erl

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   deps/rabbit/test/channel_interceptor_SUITE.erl

Cherry-pick of b29b6e6 has failed:

On branch mergify/bp/v4.3.x/pr-17182
Your branch is ahead of 'origin/v4.3.x' by 17 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit b29b6e6dd2.
  (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)

Changes to be committed:
	modified:   deps/rabbit/priv/schema/rabbit.schema
	modified:   deps/rabbit/src/rabbit_channel_interceptor.erl
	modified:   deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets
	modified:   deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/set_channel_interceptor_priorities_command.ex

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   deps/rabbit/test/channel_interceptor_SUITE.erl

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

@mergify mergify Bot added the make label Aug 15, 2026
@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@michaelklishin michaelklishin added this to the 4.3.6 milestone Aug 15, 2026
@michaelklishin michaelklishin changed the title By @Ayanda-D: Multiple channel interceptors, with a core team follow-up (backport #17182) DO NOT MERGE For after4.3.5: By @Ayanda-D: Multiple channel interceptors, with a core team follow-up (backport #17182) Aug 15, 2026
@michaelklishin michaelklishin changed the title DO NOT MERGE For after4.3.5: By @Ayanda-D: Multiple channel interceptors, with a core team follow-up (backport #17182) By @Ayanda-D: Multiple channel interceptors, with a core team follow-up (backport #17182) Aug 17, 2026
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.

2 participants