Skip to content

Fix issues with multiple src and dest queue args#8356

Merged
michaelklishin merged 2 commits intomainfrom
rabbitmq-server-8323
Mar 5, 2026
Merged

Fix issues with multiple src and dest queue args#8356
michaelklishin merged 2 commits intomainfrom
rabbitmq-server-8323

Conversation

@lukebakken
Copy link
Copy Markdown
Collaborator

@lukebakken lukebakken commented May 25, 2023

Fixes #8323

Follow-up to #2802

The src-queue-args and dest-queue-args shovel parameters were validated using rabbit_parameter_validation:proplist/3, which calls validators as Fun(Key, Value). However, the validators from rabbit_amqqueue:declare_args/0 expect to be called as Fun({Type, Value}, FullTable) — with an AMQP-typed value and the full args table for cross-referencing (e.g. check_dlxrk_arg/2 looks up x-dead-letter-exchange in the table).

This mismatch caused crashes when multiple args were specified, such as x-dead-letter-exchange + x-dead-letter-routing-key on a quorum queue, or x-max-age on a stream queue.

The fix converts the input to an AMQP table and validates using the same convention as rabbit_amqqueue:check_arguments_type_and_value/3.

@lukebakken lukebakken self-assigned this May 25, 2023
@lukebakken lukebakken requested a review from michaelklishin May 25, 2023 22:40
@lukebakken lukebakken removed the request for review from michaelklishin October 27, 2025 14:38
@lukebakken lukebakken force-pushed the rabbitmq-server-8323 branch from dcc7718 to 2fcff31 Compare October 27, 2025 14:38
@michaelklishin michaelklishin added this to the 4.3.0 milestone Oct 27, 2025
@lukebakken lukebakken force-pushed the rabbitmq-server-8323 branch from 37fe49c to bbdd717 Compare March 5, 2026 15:50
Fixes #8323

Step 1: modify test so it throws the same error
@lukebakken lukebakken force-pushed the rabbitmq-server-8323 branch from bbdd717 to 8a6e35d Compare March 5, 2026 16:26
@lukebakken lukebakken marked this pull request as ready for review March 5, 2026 16:45
@michaelklishin michaelklishin merged commit f8a5c1b into main Mar 5, 2026
182 checks passed
@michaelklishin michaelklishin deleted the rabbitmq-server-8323 branch March 5, 2026 22:14
mergify bot pushed a commit that referenced this pull request Mar 5, 2026
michaelklishin added a commit that referenced this pull request Mar 6, 2026
Fix issues with multiple src and dest queue args (backport #8356)
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.

Shovel creation crashes with certain dest-queue-args

2 participants