Skip to content
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

.NET Aspire Eventing API #5223

Merged
merged 20 commits into from
Aug 15, 2024
Merged

.NET Aspire Eventing API #5223

merged 20 commits into from
Aug 15, 2024

Conversation

mitchdenny
Copy link
Member

@mitchdenny mitchdenny commented Aug 8, 2024

Description

This PR explores the idea of introducing an eventing mechanism into .NET Aspire. It adds an Eventing property to the builder and injects an IDistributedApplicationEventing service into DI which can be used throughout the lifecycle of the application to fire off events.

Any code that can access the application builder or resolve the service from DI can publish an event and an event is extensible. Events are global so it is up to the subscriber to define the callback to filter out specific events they are not interested in (although event of a specific type only go to subscribers for that type in the current implementation).

Related #5234 (API Design issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No (not yet)
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No (this will be done - this is just a spie)
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Aug 8, 2024
@mitchdenny mitchdenny self-assigned this Aug 8, 2024
@mitchdenny mitchdenny added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication and removed area-integrations Issues pertaining to Aspire Integrations packages labels Aug 8, 2024
@mitchdenny mitchdenny marked this pull request as ready for review August 12, 2024 03:31
@mitchdenny mitchdenny changed the title DRAFT: Pub sub spike with database initialization .NET Aspire Eventing API Aug 12, 2024
@mitchdenny
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mitchdenny mitchdenny force-pushed the mitchdenny/pubsub-eventing branch 2 times, most recently from f7dd3d3 to 7cc4263 Compare August 12, 2024 22:52
@mitchdenny
Copy link
Member Author

@mitchdenny
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mitchdenny
Copy link
Member Author

Blocked on: #5273

Directory.Packages.props Outdated Show resolved Hide resolved
@mitchdenny mitchdenny merged commit 404b1b3 into main Aug 15, 2024
11 checks passed
@mitchdenny mitchdenny deleted the mitchdenny/pubsub-eventing branch August 15, 2024 04:00
@eerhardt eerhardt mentioned this pull request Aug 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants