Adds rabbitmq auto provisioning#9327
Merged
PascalSenn merged 5 commits intomainfrom Mar 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for controlling RabbitMQ topology auto-provisioning at the transport level with per-resource overrides, plus documentation and tests to validate cascading behavior and runtime provisioning outcomes.
Changes:
- Introduces transport-level
AutoProvision(bool)with a topology-level default and per-resource nullable overrides (bool?). - Updates provisioning/describe logic to respect the cascade (resource override → transport default).
- Adds docs and both unit + integration tests covering default/explicit/disabled and mixed provisioning scenarios.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/docs/mocha/v1/transports/rabbitmq.md | Documents how to disable auto-provisioning globally and override per resource, with common deployment patterns. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/Behaviors/AutoProvisionIntegrationTests.cs | Adds end-to-end RabbitMQ integration tests for auto-provisioning enabled/disabled and mixed provisioning. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/AutoProvisionTests.cs | Adds unit tests validating cascade semantics and Describe() reporting of effective autoProvision values. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Topology/RabbitMQQueue.cs | Changes queue AutoProvision to nullable and removes forced defaulting to true. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Topology/RabbitMQExchange.cs | Changes exchange AutoProvision to nullable and removes forced defaulting to true. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Topology/RabbitMQBinding.cs | Changes binding AutoProvision to nullable and removes forced defaulting to true. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Topology/RabbitMQMessagingTopology.cs | Adds topology-level AutoProvision default (true) for cascade behavior. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/RabbitMQMessagingTransport.cs | Applies cascade during startup provisioning and in Describe() output. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/RabbitMQDispatchEndpoint.cs | Updates dispatch-time provisioning to use cascade (but currently introduces a null-deref bug). |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Descriptors/RabbitMQMessagingTransportDescriptor.cs | Adds AutoProvision(bool) API to configure global provisioning behavior. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Descriptors/IRabbitMQMessagingTransportDescriptor.cs | Declares the new AutoProvision(bool) API contract. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Conventions/RabbitMQReceiveEndpointTopologyConvention.cs | Propagates endpoint auto-provision setting into queue topology configuration (currently changes defaults in a breaking way). |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Configurations/RabbitMQTransportConfiguration.cs | Adds nullable AutoProvision setting to transport configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9327 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds auto-provisioning support to the RabbitMQ transport, allowing exchanges, queues, and bindings to be automatically created on the broker at startup.
AutoProvisiontoggle (defaults totrue) with per-resource overrides on exchanges, queues, and bindingsAutoProvisioninherits from the transport when unset (null)