-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add scaling/resilience tests and expose missing RabbitMQ queue options #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c13af41
feat: add scaling/resilience tests and expose missing queue options
niemyjski 6056375
remove migration docs; belongs in foundatiofx/Foundatio docs
niemyjski f178f90
```
niemyjski 4f356e1
fix: address PR feedback - type safety, code quality, and restored co…
niemyjski 2b660ab
refactor: simplify DelayedRetryType enum - use ToString().ToLowerInva…
niemyjski 415c616
refactor: use [EnumMember] attribute for DelayedRetryType wire values
niemyjski d4c1af7
refactor: move EnumExtensions to Extensions folder
niemyjski 5e2790a
feat: add RabbitMQ 4.3 quorum queue options - dead-letter strategy, o…
niemyjski 2293784
fix: cache reflection in EnumExtensions, add quorum queue guards for …
niemyjski 578828f
style: rename s_cache to Cache per project conventions
niemyjski ad183b2
fix: resolve PR feedback - field keyword, version gating, test reliab…
niemyjski dff68b7
fix: prevent CI test hang and fix quorum queue GlobalQos fallback
niemyjski af0ab68
fix: increase Aspire CreateAsync timeout to 5 min for CI image pulls
niemyjski 3b64d25
fix: skip tests gracefully when Aspire infrastructure is unavailable
niemyjski 3a16e64
perf: reduce chaos test delays and increase Aspire health check timeouts
niemyjski f4c18c1
fix: narrow generic catch clauses per PR feedback
niemyjski ce0943c
fix: revert StartAsync to 2min and chaos health to 30s to prevent CI …
niemyjski 03f4009
fix: address remaining PR feedback - use MessageBusException for conf…
niemyjski 3364af2
feat: Add RabbitMQ message priority support and documentation updates
niemyjski 06e3384
fix: address remaining PR feedback from Copilot review
niemyjski a19c742
fix: use explicit LINQ Where filter for Properties iteration
niemyjski b13be24
fix: simplify OperationCanceledException handling in WaitForNodeReady…
niemyjski 525149b
Delete write_doc.py
niemyjski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| using System; | ||
| using System.Collections.Concurrent; | ||
| using System.Reflection; | ||
| using System.Runtime.Serialization; | ||
|
|
||
| namespace Foundatio.Messaging; | ||
|
|
||
| internal static class EnumExtensions | ||
| { | ||
| private static readonly ConcurrentDictionary<Enum, string> Cache = new(); | ||
|
|
||
| public static string ToEnumString<T>(this T value) where T : struct, Enum | ||
| { | ||
| return Cache.GetOrAdd(value, static v => | ||
| { | ||
| var member = v.GetType().GetField(v.ToString()!); | ||
| var attribute = member?.GetCustomAttribute<EnumMemberAttribute>(); | ||
| return attribute?.Value ?? v.ToString()!; | ||
| }); | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| using System.Runtime.Serialization; | ||
|
|
||
| namespace Foundatio.Messaging; | ||
|
|
||
| /// <summary> | ||
| /// Dead-letter strategy for quorum queues. | ||
| /// Controls how messages are transferred to the dead-letter exchange. | ||
| /// Set via the x-dead-letter-strategy queue argument. | ||
| /// See: https://www.rabbitmq.com/docs/quorum-queues#dead-lettering | ||
| /// </summary> | ||
| public enum DeadLetterStrategy | ||
| { | ||
| /// <summary> | ||
| /// Default. Messages may be lost in transit between queues during dead-lettering. | ||
| /// Suitable when dead-lettered messages are informational and loss is acceptable. | ||
| /// </summary> | ||
| [EnumMember(Value = "at-most-once")] | ||
| AtMostOnce, | ||
|
|
||
| /// <summary> | ||
| /// Guarantees message transfer to the dead-letter exchange using internal publisher confirms. | ||
| /// Requires overflow to be set to reject-publish (not drop-head). | ||
| /// Uses more memory and CPU. Only enable when dead-lettered messages must not be lost. | ||
| /// </summary> | ||
| [EnumMember(Value = "at-least-once")] | ||
| AtLeastOnce | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Queue overflow behavior when a queue reaches its maximum length. | ||
| /// Set via the x-overflow queue argument. | ||
| /// See: https://www.rabbitmq.com/docs/maxlength#overflow-behaviour | ||
| /// </summary> | ||
| public enum QueueOverflowBehavior | ||
| { | ||
| /// <summary> | ||
| /// Default. Drop or dead-letter messages from the head (oldest) of the queue. | ||
| /// </summary> | ||
| [EnumMember(Value = "drop-head")] | ||
| DropHead, | ||
|
|
||
| /// <summary> | ||
| /// Reject new publishes with basic.nack when the queue is full. | ||
| /// Required for at-least-once dead-lettering on quorum queues. | ||
| /// </summary> | ||
| [EnumMember(Value = "reject-publish")] | ||
| RejectPublish | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| using System.Runtime.Serialization; | ||
|
|
||
| namespace Foundatio.Messaging; | ||
|
|
||
| /// <summary> | ||
| /// Specifies the native delayed retry behavior for quorum queues (RabbitMQ 4.3+). | ||
| /// Maps to the x-delayed-retry-type queue argument. | ||
| /// See: https://www.rabbitmq.com/docs/quorum-queues#delayed-retries | ||
| /// </summary> | ||
| public enum DelayedRetryType | ||
| { | ||
| /// <summary> | ||
| /// All returned messages (nacks, rejects, and timeouts) are delayed before redelivery. | ||
| /// </summary> | ||
| [EnumMember(Value = "all")] | ||
| All, | ||
|
|
||
| /// <summary> | ||
| /// Messages returned without marking the delivery as failed are delayed. | ||
| /// Includes: basic.nack, AMQP 1.0 released, modified with delivery-failed=false. | ||
| /// These do NOT increment delivery-count, supporting unlimited returns. | ||
| /// </summary> | ||
| [EnumMember(Value = "returned")] | ||
| Returned, | ||
|
|
||
| /// <summary> | ||
| /// Only messages where delivery actually failed are delayed. | ||
| /// Includes: basic.reject, client crash, AMQP 1.0 rejected, modified with delivery-failed=true. | ||
| /// These increment delivery-count toward the delivery-limit. | ||
| /// </summary> | ||
| [EnumMember(Value = "failed")] | ||
| Failed, | ||
|
|
||
| /// <summary> | ||
| /// Delayed retry is explicitly disabled. | ||
| /// </summary> | ||
| [EnumMember(Value = "disabled")] | ||
| Disabled | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.