Skip to content

Document subscription handler registration changes - #9

Merged
alexeyzimarev merged 4 commits into
mainfrom
docs/subscription-handler-registration
Aug 21, 2026
Merged

Document subscription handler registration changes#9
alexeyzimarev merged 4 commits into
mainfrom
docs/subscription-handler-registration

Conversation

@alexeyzimarev

Copy link
Copy Markdown
Contributor

Documents the changes from Eventuous/eventuous#577 (fixing Eventuous/eventuous#576) in dotnet-next/whats-new.mdx.

Three entries:

  • Breaking changes → One handler type per subscription. Registering the same handler type twice on one subscription now throws instead of silently dispatching every event to the same instance twice.
  • New features → Event handlers created by a factory are disposed. The subscription now owns handlers its factories created and disposes them, after the pipe filters have drained. Container-registered and caller-supplied handlers are unchanged.
  • Bug fixes → Handlers registered with a factory no longer collapse into one. The actual #576 bug, with the Func<IServiceProvider, IEventHandler> collection that triggers it, plus a note that factory-registered handlers are no longer resolvable by key from the container.

Nothing needed correcting elsewhere — the handler docs only ever covered AddEventHandler<T>() and never described the keyed container registration this changes.

npx astro build passes: 156 pages built.

🤖 Generated with Claude Code

Covers the fix for handlers registered with a factory collapsing into one,
the disposal of factory-created handlers by the subscription, and the new
rejection of duplicate handler types on a single subscription.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Document subscription handler registration changes in dotnet-next whats-new

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Document breaking change: duplicate handler types per subscription now throw
• Document new ownership: factory-created handlers are disposed by the subscription
• Document bug fix: factory-registered handlers no longer collapse into one instance
Diagram

graph TD
  A["whats-new.mdx"] --> B["Breaking changes"] --> C["One handler type"]
  A --> D["New features"] --> E["Factory handlers disposed"]
  A --> F["Bug fixes"] --> G["Factory handlers no collapse"]
  C --> H["Subscription registration"]
  E --> H
  G --> H
  subgraph Legend
    direction LR
    _doc["Doc page"] ~~~ _sec["Section"] ~~~ _api["API behavior"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Add details to the subscription handler docs (concept page) instead of release notes
  • ➕ More discoverable for users who aren’t reading release notes
  • ➕ Allows fuller explanation of ownership/disposal and registration constraints
  • ➖ Dilutes the purpose of the whats-new page as a concise change log
  • ➖ Requires more restructuring/maintenance to keep conceptual docs in sync across versions
2. Link to upstream PR/issues only, with minimal in-repo text
  • ➕ Lower maintenance burden for the docs site
  • ➕ Avoids duplicating nuanced container/subscription semantics in prose
  • ➖ Forces readers to context-switch to GitHub for critical behavior changes
  • ➖ Upstream issue/PR discussions are not optimized as end-user documentation

Recommendation: Keep the detailed explanations and examples in dotnet-next/whats-new.mdx as done here, since these are behavior changes users need to notice during upgrades (breaking change + subtle bug fix). If follow-up docs work is planned, add a short link from the handler/subscription conceptual docs to this entry (or to a future dedicated page) for long-term discoverability.

Files changed (1) +53 / -0

Documentation (1) +53 / -0
whats-new.mdxAdd release notes for subscription handler registration behavioral changes +53/-0

Add release notes for subscription handler registration behavioral changes

• Adds new Breaking changes, New features, and Bug fixes entries documenting subscription handler registration changes. Includes code examples covering duplicate handler type rejection, disposal semantics for factory-created handlers, and the fix for factory-registered handlers collapsing into a single instance (plus the container-resolution consequence).

src/content/docs/dotnet-next/whats-new.mdx

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display preferences with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
eventuous-docs 5e39f93 Commit Preview URL

Branch Preview URL
Aug 21 2026, 10:45 AM

alexeyzimarev and others added 3 commits August 21, 2026 12:38
Follows the review on Eventuous/eventuous#577: a handler factory may return a
handler owned elsewhere, so the subscription only disposes handlers the
caller explicitly hands it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alexeyzimarev
alexeyzimarev merged commit 00b82a2 into main Aug 21, 2026
1 check passed
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.

1 participant