Skip to content

Configure ServiceBusProcessorOptions for Azure Service Bus listeners (supersedes #3286)#3293

Merged
jeremydmiller merged 2 commits into
mainfrom
feat/asb-processor-options-3286
Jul 5, 2026
Merged

Configure ServiceBusProcessorOptions for Azure Service Bus listeners (supersedes #3286)#3293
jeremydmiller merged 2 commits into
mainfrom
feat/asb-processor-options-3286

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Supersedes #3286 (by @jorik). The original commit is preserved verbatim (same authorship); this PR adds only the dependency fix needed to get CI green on current main.

Feature (from #3286, @jorik)

Adds a ConfigureProcessor(Action<ServiceBusProcessorOptions>) fluent method on both AzureServiceBusQueueListenerConfiguration and AzureServiceBusSubscriptionListenerConfiguration, so long-running inline handlers can raise MaxAutoLockRenewalDuration (and set any other ServiceBusProcessorOptions) instead of being stuck at the Azure SDK's 5-minute default. ReceiveMode is re-asserted to PeekLock since the inline listener acks/defers/dead-letters against the lock. Scoped to the non-session inline processor paths. See #3286 for the full write-up.

Why a superseding PR

#3286's branch was behind main and its core CI jobs (build, test, CIKafka, CIPersistence, describe-handlers-smoke) went red — not because of the ASB change, but because a newly-published advisory tripped restore repo-wide.

Dependency fix

Microsoft.AspNetCore.OpenApi 10.0.0 transitively pulls Microsoft.OpenApi 2.0.0, which now carries a high-severity advisory (GHSA-v5pm-xwqc-g5wc — uncontrolled recursion / stack overflow parsing circular schema refs; patched in 2.7.5). With TreatWarningsAsErrors=true, the NU1903 restore audit becomes a hard build break.

Fix:

  • Add a centrally-versioned Microsoft.OpenApi 2.7.5 in Directory.Packages.props.
  • Add a scoped direct reference in a new Directory.Build.targets, applied only when a project targets net10.0 and references Microsoft.AspNetCore.OpenApi, so the patched 2.7.5 (same 2.x major) wins over the transitive 2.0.0.

Deliberately narrow — verified against the actual resolved graphs:

  • net9.0 resolves Microsoft.OpenApi 1.6.x (not in the affected range) → left untouched.
  • Swashbuckle-only web apps resolve Microsoft.OpenApi 1.2.x → forcing 2.x would break Swashbuckle 6.5.0, and they aren't vulnerable → left untouched.
  • Non-web test projects (e.g. Wolverine.Kafka.Tests) inherit the pin transitively via their project references to the web apps.

Verification (local)

  • dotnet restore wolverine.slnx → exit 0, 0 × NU1903, no new errors.
  • Resolved versions confirmed per TFM: InMemoryMediator net10 → 2.7.5, net9 → 1.6.17; Swashbuckle-only app → 1.2.3 both TFMs; Wolverine.Kafka.Tests net10 → 2.7.5 (inherited).
  • CoreTests (net9.0): 1834 passed, 0 failed, 2 skipped.
  • Wolverine.AzureServiceBus / .Tests build clean.

Closing #3286 in favor of this. Full credit to @jorik for the feature.

🤖 Generated with Claude Code

jorik and others added 2 commits July 5, 2026 09:17
…HSA-v5pm-xwqc-g5wc)

Microsoft.AspNetCore.OpenApi 10.0.0 pulls the vulnerable Microsoft.OpenApi 2.0.0
transitively on net10.0. With TreatWarningsAsErrors=true, the NU1903 restore audit
turns that advisory into a hard build break across the solution.

Add a centrally-versioned Microsoft.OpenApi 2.7.5 (same 2.x major, API-compatible)
and a scoped direct reference in Directory.Build.targets that only applies when a
project targets net10.0 AND references Microsoft.AspNetCore.OpenApi — so the patched
version wins over the transitive 2.0.0. net9.0 (Microsoft.OpenApi 1.6.x) and
Swashbuckle-only web apps (1.2.x) are left untouched since neither is in the affected
range; non-web test projects inherit the pin transitively through project references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit fb34f43 into main Jul 5, 2026
25 checks passed
This was referenced Jul 9, 2026
This was referenced Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants