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

feat: add DomainEvent activity #5994

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cfgiugliano
Copy link
Contributor

@cfgiugliano cfgiugliano commented Oct 2, 2024

This adds the DomainEvent activity as proposed in #5583


This change is Reviewable

@cfgiugliano
Copy link
Contributor Author

@dotnet-policy-service agree

@sfmskywalker
Copy link
Member

Would it make sense to use INotificationSender instead of IWebhookDispatcher?

@cfgiugliano
Copy link
Contributor Author

cfgiugliano commented Oct 3, 2024

This was added to provide feature parity with the RunTask and I thought this was just a default notification handler, but what would be the reason for this additional indirection of a notification publishing another notification?

@cfgiugliano cfgiugliano marked this pull request as ready for review October 3, 2024 20:09
@sfmskywalker
Copy link
Member

I was more thinking that we want to be able to publish domain events, which are "lower-level" than webhook events. Ergo, it doesn't make sense to me to use a service called "webhook dispatcher" when it has nothing to do with webhooks. For that reason, I'm thinking that using INoticationSender is more suitable. The webhook dispatcher uses this too under the hood. Alternatively, we could consider adding a new service called e.g. IDomainEventDispatcher (which would probably still use INotificationSender, just like IWebhookDispatcher).

@cfgiugliano
Copy link
Contributor Author

But the activity execution is already publishing a the domain event as notification using INotificationSender (this could be chanced to consume a IDomainEventDispatcher, yes) but the current handler is just a default implementation of the notification handler like for RunTask. If required, it is still possible to implement a custom handler and handle the domain event with custom logic

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