Skip to content

Add support for RabbitMQ 4.4 and Erlang 29 - #1

Open
gomoripeti wants to merge 5 commits into
cloudamqp_mainfrom
rabbitmq-4.4-erlang-29-support
Open

gomoripeti wants to merge 5 commits into
cloudamqp_mainfrom
rabbitmq-4.4-erlang-29-support

Conversation

@gomoripeti

@gomoripeti gomoripeti commented Dec 2, 2026 •

Copy link
Copy Markdown

Summary

Add support for RabbitMQ 4.4 and Erlang/OTP 29.

  • mix.exs: add 4.4.x to broker_version_requirements (see below).
  • Makefile: default build to v4.4.x.
  • CI: add v4.4.x on Erlang 29 / Elixir 1.20, and move main to the same versions (RabbitMQ 4.4 and main are tested upstream on these).
  • Remove unused requires that Elixir 1.20 (needed for OTP 29) warns about.
  • Fix a CacheManager unit test race that shows up on OTP 29.

No RabbitMQ API changes in 4.4 affect the plugin (checked the modules and functions it calls against 4.3).

Broker version requirement format

RabbitMQ 4.4 parses broker_version_requirements as semver ranges (rabbit_semver_range). A plain X.Y.Z now matches only that exact version, so 4.4.0 would refuse 4.4.1 and later. 4.4.x matches the whole 4.4 series and nothing else.

Brokers 3.13 to 4.3 still use the old logic (same major.minor, version >= requirement), so they keep matching their own X.Y.0 entries. I checked both sets of rules against the list:

Broker Old rules (3.13–4.3) New rules (4.4)
3.12.x rejected –
3.13.0 … 4.3.9 accepted –
4.3.9 – rejected
4.4.0, 4.4.1, 4.4.20 – accepted
4.5.0, 5.0.0 rejected rejected

OTP 29 behaviour change

Since OTP 29 the application controller stops applications in a separate process instead of blocking. Calling mnesia:start() while Mnesia is stopping now returns ok right away, and Mnesia ends up stopped. On OTP 27 the call waited for the stop to finish and then started Mnesia again.

The CacheManager stops Mnesia asynchronously in terminate/2, so the next CacheManager test failed with node_not_running. The tests now wait for Mnesia to stop after each test.

In production this only matters if the plugin or app is stopped and started again within milliseconds (rabbit_sup does not restart children), so the plugin code is unchanged.

Testing

Locally, with RabbitMQ v4.4.x, Erlang 29.1.3 and Elixir 1.20.5:

  • ExUnit: 18/18 (also ran with 6 different seeds)
  • CT: cluster_SUITE 3/3, exchange_SUITE 7/7, queue_SUITE 8/8, registration_SUITE 2/2
  • make dist MIX_ENV=prod DIST_AS_EZS=yes builds the .ez files
  • Installed the prod .ez files in the RabbitMQ 4.4.1 generic-unix release: with 4.4.0, rabbitmq-plugins enable failed with "Plugin doesn't support current server version". With 4.4.x, the plugin is enabled, its boot steps run and the exchange type is registered.

Older versions run in CI only.

https://claude.ai/code/session_01HTxhzP4E6n8zMXA39fAs8J


Generated by Claude Code

Since RabbitMQ 4.4 broker version requirements are semver ranges, and
`4.4.0` would only match that exact version. `4.4.x` matches the
whole 4.4 series. Older brokers keep matching their own `X.Y.0`
entries.
RabbitMQ 4.4 and main are tested upstream on Erlang/OTP 29 with
Elixir 1.20, so build main with the same versions.
Elixir 1.20, needed for Erlang/OTP 29, warns about them. Cache and
Common define no macros, so requiring them is not needed.
The Cache Manager stops Mnesia asynchronously on termination. Since
Erlang/OTP 29 the application controller stops applications without
blocking, so starting Mnesia while it is still stopping returns ok
right away and Mnesia ends up stopped. The next test then failed with
node_not_running.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

No active review issues remain, with the version updates, CI coverage, and Mnesia shutdown synchronization addressed in the reviewed changes.

No open issues 🎉

What changed in this PR

Adds RabbitMQ 4.4 and Erlang/OTP 29 support, including version requirements, CI coverage, and an OTP 29 Mnesia test-race fix.

Changes:

  • Supports RabbitMQ 4.4 and updates the default build version.
  • Adds OTP 29/Elixir 1.20 CI coverage.
  • Removes unused requirements and synchronizes Mnesia shutdown in tests.
File Description
test/​cache_manager_test.exs Waits for asynchronous Mnesia shutdown between tests.
mix.exs Adds the RabbitMQ 4.4 version requirement.
Makefile Defaults builds to RabbitMQ 4.4.x.
lib/​rabbitmq_message_deduplication/​rabbit_message_deduplication_queue.ex Removes unused requirements.
lib/​rabbitmq_message_deduplication/​rabbit_message_deduplication_exchange.ex Removes unused requirements.
lib/​rabbitmq_message_deduplication/​common.ex Removes an unused requirement.
lib/​rabbitmq_message_deduplication/​cache_manager.ex Removes an unused requirement.
.github/​workflows/​action.yml Adds RabbitMQ 4.4 and OTP 29 CI coverage.

Review effort: Lite

@gomoripeti
gomoripeti marked this pull request as ready for review December 2, 2026 23:50

@LoisSotoLopez LoisSotoLopez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I 🕵️ no flaws.

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.

3 participants