Skip to content

Upgrade Subscriptions.Nats to official NATS v2 client#9206

Merged
michaelstaib merged 3 commits intomainfrom
codex/update-nats-v2-client
Feb 26, 2026
Merged

Upgrade Subscriptions.Nats to official NATS v2 client#9206
michaelstaib merged 3 commits intomainfrom
codex/update-nats-v2-client

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

@michaelstaib michaelstaib commented Feb 25, 2026

  • replace AlterNats.Hosting with official NATS v2 packages (NATS.Client.Core and NATS.Extensions.Microsoft.DependencyInjection)
  • migrate NatsTopic subscription lifecycle to the NATS v2 async subscription API with explicit cancellation/disposal handling
  • pass cancellation tokens through NATS publish calls
  • update Subscriptions.Nats docs and DI guidance to AddNatsClient(...)
  • add an integration test that verifies topic prefix isolation across two servers sharing the same NATS broker

Closes #6809.
Closes #7532.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant 2 (50 VUs) 3158.45 0.00%
Ramping 2 (0-500-0 VUs) 3725.98 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 1.19ms 12.77ms 15.55ms 25.15ms 34.53ms 261.68ms
Ramping 2 1.36ms 53.44ms 58.86ms 101.64ms 148.17ms 290.95ms

Deep Recursion Query

Req/s Err%
Constant 2 (50 VUs) 745.91 0.00%
Ramping 2 (0-500-0 VUs) 887.82 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 9.57ms 57.57ms 64.70ms 83.37ms 101.32ms 750.86ms
Ramping 2 2.97ms 208.25ms 232.41ms 481.99ms 537.47ms 804.67ms

Variable Batching Throughput

Req/s Err%
Constant 2 (50 VUs) 5674.70 0.00%
Ramping 2 (0-500-0 VUs) 5269.11 0.00%
Response Times
Min Med Avg P90 P95 Max
Constant 2 0.16ms 8.23ms 8.71ms 14.55ms 17.60ms 64.11ms
Ramping 2 0.19ms 39.16ms 43.59ms 81.61ms 105.81ms 208.04ms

Runner 2 = benchmarking-2

Run 22439451158 • Commit 80b382e • Thu, 26 Feb 2026 11:22:07 GMT

@michaelstaib michaelstaib added the 🔍 investigate Indicates that an issue or pull request needs more information. label Feb 25, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (6a3b7a3) to head (86181eb).
⚠️ Report is 820 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #9206       +/-   ##
==========================================
- Coverage   74.16%       0   -74.17%     
==========================================
  Files        2677       0     -2677     
  Lines      140790       0   -140790     
  Branches    16371       0    -16371     
==========================================
- Hits       104421       0   -104421     
+ Misses      30774       0    -30774     
+ Partials     5595       0     -5595     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the 📚 documentation This issue is about working on our documentation. label Feb 26, 2026
@michaelstaib michaelstaib added 🎬 ready Ready to merge and removed 🔍 investigate Indicates that an issue or pull request needs more information. labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate 🎬 ready Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update NATS library

1 participant