Repository navigation
Add version-gated deprecation handling for rabbitmq_delayed_message_exchange plugin - #71
Conversation
…xchange plugin The plugin depends on Mnesia which is removed in RabbitMQ 4.3, making it incompatible. This change detects the server version on connection and: - Skips the delayed exchange plugin probe on RabbitMQ >= 4.3 - Logs a deprecation warning when the plugin is detected on older versions - Falls back to the existing in-memory delay mechanism automatically - Documents delayed message behavior and migration guidance in README
There was a problem hiding this comment.
Pull request overview
Adds RabbitMQ server-version detection to version-gate probing of the rabbitmq_delayed_message_exchange plugin, warning users on older servers and documenting the fallback behavior.
Changes:
- Detect RabbitMQ server version from
IConnection.ServerPropertiesand skip delayed-exchange probing on RabbitMQ ≥ 4.3. - Emit a deprecation warning when the delayed-exchange plugin is successfully used on RabbitMQ < 4.3.
- Add unit tests for
ParseServerVersionand document delayed message delivery behavior/migration guidance in the README.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Foundatio.RabbitMQ/Messaging/RabbitMQMessageBus.cs | Adds server version detection, version-gated delayed-exchange probe, deprecation warning, and ParseServerVersion API. |
| tests/Foundatio.RabbitMQ.Tests/Messaging/RabbitMqServerVersionTests.cs | Adds unit coverage for ParseServerVersion inputs and basic version threshold comparisons. |
| README.md | Documents delayed delivery behavior across RabbitMQ versions and migration guidance away from the deprecated plugin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… fix typo - Add DetectServerVersion calls in publisher and subscriber fallback reconnection paths so _serverVersion is populated even when the first connection failed to create the delayed exchange - Clarify XML doc on CreateDelayedExchangeAsync to note that the probe is still attempted when version detection fails - Fix README typo: "delay delivery" to "delayed delivery"
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…-disabled
- Change CreateDelayedExchangeAsync to return bool? (true = plugin
declared, null = skipped/cached-disabled with channel still healthy,
false = probe threw and channel is likely closed)
- Publisher and subscriber init paths now only tear down and reconnect
when the probe actually failed (false); when skipped (null) they
declare the regular exchange on the existing healthy channel
- Improve catch block log message to be neutral ("Unable to declare
delayed exchange") and include ShutdownReason ReplyCode/ReplyText
for better operator diagnostics
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
IConnection.ServerPropertieson first connectionMessageBusBase.SendDelayedMessage) automaticallyParseServerVersionpublic static method with comprehensive unit testsContext
The rabbitmq_delayed_message_exchange plugin is archived and no longer maintained. It depends on Mnesia, which is removed in RabbitMQ 4.3. This PR ensures users are warned on older versions and the library gracefully handles the transition without breaking changes.
Test plan
ParseServerVersionunit tests pass (13 tests covering valid versions, null/missing/invalid inputs, and version comparison)