Repository navigation
[Mocha] Configure receive resilience on RabbitMQ queues - #10507
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Queue-configured immediate retry policies are not honored by the consumer retry middleware.
1 open finding
What changed in this PR
Enables RabbitMQ queue descriptors to configure receive resilience through callbacks applied to their receive endpoints.
Changes:
- Adds
IConfigurable<T>and adapts resilience extensions. - Records queue callbacks and replays them onto receive endpoints.
- Tests feature configuration and exception-policy composition.
| File | Description |
|---|---|
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/Descriptors/RabbitMQUnifiedQueueTests.cs | Tests queue resilience configuration. |
| src/Mocha/src/Mocha/Transport/MessagingTransportDescriptor.cs | Applies receive-provider callbacks immediately. |
| src/Mocha/src/Mocha/Middlewares/Receive/ConcurrencyLimiter/ConcurrencyLimiterConfigurationExtensions.cs | Uses configurable targets for concurrency limits. |
| src/Mocha/src/Mocha/Middlewares/Receive/CircuitBreaker/CircuitBreakerConfigurationExtensions.cs | Uses configurable targets for circuit breakers. |
| src/Mocha/src/Mocha/Middlewares/Consume/Retry/ResilienceConfigurationExtensions.cs | Uses configurable targets for resilience policies. |
| src/Mocha/src/Mocha/Descriptors/IConfigurable.cs | Defines the callback contract. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Descriptors/RabbitMQQueueDescriptor.cs | Records receive-endpoint callbacks. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Descriptors/RabbitMQMessagingTransportDescriptor.cs | Replays queue callbacks onto endpoints. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Descriptors/IRabbitMQQueueDescriptor.cs | Exposes receive configuration support. |
| src/Mocha/src/Mocha.Transport.RabbitMQ/Configurations/RabbitMQQueueDescriptorConfiguration.cs | Stores ordered callbacks. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Contributor
Patch coverage82.1% of changed lines covered (23/28)
Uncovered changed lines (JSON){
"sha": "fe61552fb55eff4d05e7a69d8e1cfc6d61de99ad",
"files": [
{ "path": "src/Mocha/src/Mocha/Middlewares/Consume/Retry/ResilienceConfigurationExtensions.cs", "ranges": [[78, 82]] }
]
}Project coverage: 58.6% (314230/536423 lines) |
tobias-tengler
approved these changes
Oct 8, 2026
PascalSenn
force-pushed
the
pse/mocha-configurable-rabbitmq-queue
branch
from
October 8, 2026 20:15
50ff4f1 to
fac31dd
Compare
Adds IConfigurable<T> and moves AddResilience, AddCircuitBreaker and AddConcurrencyLimiter onto IConfigurable<IReceiveMiddlewareProvider>. Receive middleware providers apply the callback immediately. The RabbitMQ Queue(...) descriptor records the callbacks and replays them onto the queue's receive endpoint.
PascalSenn
force-pushed
the
pse/mocha-configurable-rabbitmq-queue
branch
from
October 9, 2026 10:09
fac31dd to
0e1abc2
Compare
This was referenced Oct 25, 2026
Merged
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.

Adds IConfigurable and moves AddResilience, AddCircuitBreaker and
AddConcurrencyLimiter onto IConfigurable.
Receive middleware providers apply the callback immediately. The
RabbitMQ Queue(...) descriptor records the callbacks and replays them
onto the queue's receive endpoint.
Stack created with GitHub Stacks CLI • Give Feedback 💬