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

Feature Request: Async Notifications Delegates #5393

Closed
gbiellem opened this issue Jun 11, 2019 · 8 comments · Fixed by #5449
Closed

Feature Request: Async Notifications Delegates #5393

gbiellem opened this issue Jun 11, 2019 · 8 comments · Fixed by #5449
Assignees
Milestone

Comments

@gbiellem
Copy link
Contributor

The Notifications delegates aren't async in NSB 7.1.x
Would like to see this move to async in a future version

@DavidBoike
Copy link
Member

Hi Greg! Good to hear from you!

This seems like something we can tackle with our (fairly new) enhancement release process. I've labeled it as an Enhancement so it can get picked up by that, but it will likely get more thoroughly triaged when its turn comes up.

@SimonCropp
Copy link
Contributor

@DavidBoike how often does this triage happen?

@DavidBoike
Copy link
Member

That's a good question. Best I can say is "it depends." We're trying to cycle through repos, and as you know Core is a bit of a unique animal.

@timbussmann
Copy link
Contributor

@gbiellem I assume you refer to the error notifications (https://docs.particular.net/nservicebus/recoverability/subscribing-to-error-notifications?version=core_7.2), is that correct? Given those are .net events and you can use async void on them, is there a specific reason you'd like to see them being async?

@gbiellem
Copy link
Contributor Author

gbiellem commented Oct 2, 2019

@timbussmann True, async void is an option but I'd prefer a task based API rather than doing fire and forget using async void and have to deal with all the issues around it.

@timbussmann
Copy link
Contributor

@gbiellem can you describe what type of code you're running as part of those notifications that fire&forget is not a good option for you? What types of issues are you referring to?

@SimonCropp
Copy link
Contributor

@timbussmann with fire and forget... wont that cause potential issues with scoping of the container for things that are unit of work. ie the UOW could end while some things in the task still need them. Also how are dangling tasks handled when the endpoint is shutdown

@timbussmann timbussmann self-assigned this Oct 4, 2019
@timbussmann timbussmann modified the milestones: 6.2.0, 7.2.0 Oct 4, 2019
@timbussmann
Copy link
Contributor

yeah the child container scope could be disposed during an async void callback, that's true. Are you resolving scoped services in your event handlers?

Internally, we already have a task-based notifications API, I'm currently looking into exposing this for public usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants