Repository navigation
Service Bus: GroupId as SessionId, session receive, safe delayed retry, fast emulator drain - #103
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6add28c23
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Updated 2026-10-06: reviewed repairs are now pushed at The build caller is pinned to guarded core commit Repair and local validation evidenceFollow-up repair registers the shared empty-GroupId test and isolates RequiresSession guards from service-dependent fixture cleanup. The two standalone dequeue/worker guard tests pass against sibling core source; both library target frameworks build with zero warnings/errors. The shared empty-group wrapper is registered but was not run against a Service Bus emulator in this follow-up. Session-enabled receiving remains a pre-existing unsupported capability; this work is producer-only and adds no session receiver. No live Service Bus validation is claimed. These local checks ran on 2026-10-05. Application/test source is unchanged from those validated repair commits; this follow-through added only the approved workflow guard/pin. YAML parsing and diff checks passed. No new local application test run is claimed. |
Service Bus ignores SessionId unless the queue requires sessions, and this provider cannot receive from session-enabled queues, so GroupId cannot change delivery. Remove SupportsGroupId so the base queue logs that, and add a regression test. Also consume the queue-group-id nightly of Foundatio and Foundatio.TestHarness until a release is available.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 similar comment
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Downstream CI pin: this PR consumes |
A failed send after completing the original lost the message. The retry is now sent first, and gets a new MessageId when duplicate detection is on so it is not dropped as a duplicate. The worker loop now logs SDK timeouts and waits at least one second after a dequeue error. Adds the delayed-retry GroupId test.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…tate-driven and settle in-flight entries on delete Drain peeks the queue instead of sleeping for 5s per call, waits only for a peeked scheduled message's due time (the emulator ignores CancelScheduledMessagesAsync), and DeleteQueueAsync completes messages this instance dequeued but never settled so their locks cannot leak into later tests. Emulator suite: ~19 min with cross-test failures -> 39s green.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ef8fae35a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ded01a755
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rs, drain scan type, worker error backoff, TimeProvider for schedules
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ab8077a55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… send, release expired unsettled entries, share accept/receive deadline, avoid retry copies with duplicate detection, count copy redeliveries
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45430298db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…cked entries, grace period before releasing expired locks, document RetryDelay
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eca2270a89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Production hardening pass (4543029, eca2270):
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eca2270a89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…es that fail to settle during delete, let Enqueuing handlers assign a missing session GroupId
What this adds
Support for the new
QueueEntryOptions.GroupIdfrom Foundatio core (FoundatioFx/Foundatio#579).GroupIdis sent as the Service BusSessionId. An explicitAzureServiceBusQueueEntryOptions.SessionIdstill wins when both are set.IQueueEntry.GroupIdis filled fromSessionId, both on theEnqueuedevent entry and on dequeue.SessionIdis copied onto the scheduled message used for a delayed retry, soGroupIdsurvives abandon.RequiresSession = true) can now be received from. Each dequeue accepts the next available session and receives one message. The entry holds that session until it is completed, abandoned or dead-lettered, so each group is processed one message at a time, in order.RenewLockAsyncrenews the session lock. On these queuesSupportsGroupIdis true; every message needs aGroupId.Bug fixes
DeleteQueueAsyncno longer sleeps or leaks messages into later tests. The emulator path (used only when the connection string hasUseDevelopmentEmulator=true) drains instead of deleting. It used to poll for 5 seconds on every call even when the queue was empty, and it couldn't see messages locked by an unsettled entry. Those reappeared once the 1-minute lock expired, inside whichever test ran next. Now:CancelScheduledMessagesAsync, so they can't be cancelled.DeleteQueueAsyncfirst completes any message this queue instance dequeued but never settled.Test suite speed
mainCIEvery queue test paid the 5-second drain three times (setup, cleanup, and the harness's per-test
DisposeAsync), which accounted for roughly 16s of each test. A simple enqueue/dequeue test went from 16.5s to 0.43s. Locally the full suite passed twice in a row in 39s with no leaked-lock warnings.Tests
AzureServiceBusSessionQueueTestsruns the sharedQueueTestBasesuite against a session-enabled emulator queue (foundatio-test-queue-sessions, added toConfig.json). It also covers per-group ordering (A1, A2 before B1, one in flight per group) and renew/abandon/complete on the session receiver. Four shared tests that enqueue without aGroupIdare skipped, because session queues reject them.GroupIdsent asSessionId, explicitSessionIdwins, andGroupIdkept on delayed retry.QueueTestBase.Built against
13.0.5-preview.0.10of core/TestHarness.Not in this PR (draft follow-ups, held for the next release)
PartitionKey,Subject,ContentTypeand other fields are kept, and using a newMessageIdwhenRequiresDuplicateDetectionis on (scheduled messages count for duplicate detection, so today's retry is dropped on those queues).Docs
azure.mddocumentsRequiresSessionordering;provider-behavioral-gaps.mdmarks Service BusGroupIdas ordered per group on session-enabled queues and describes the at-least-once retry.Compatibility
Only adds behavior. Receiving from a
RequiresSessionqueue used to fail with an SDK error and now works. Emulator-only:DeleteQueueAsyncnow also completes messages this instance has in flight. Stable release ordering is coordinated with core (FoundatioFx/Foundatio#579).