Improve error handling and automatic reconnection of PubSub streaming message handler - #1888
Merged
Conversation
…sage handler Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1888 +/- ##
==========================================
+ Coverage 62.73% 62.77% +0.04%
==========================================
Files 338 338
Lines 9883 9913 +30
Branches 1157 1165 +8
==========================================
+ Hits 6200 6223 +23
- Misses 3363 3367 +4
- Partials 320 323 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improving error handling and automatic reconnection of the PubSub streaming message handler.
This PR supersedes the contribution here by replacing the three independent
ContinueWithcontinuations and their attendant dedupe flags, fault cache and stream-reset coordination with a singleTask.WhenAllsupervisor that uses plain async/await. This eliminates the entire class of race conditions the original had to patch. Faults surface through theIDaprSubscription. This uses a completion task instead of a cache-and-rethrow-on-next-subscribe model, so callers who never retry can still observe errors. It also wraps multiple exceptions in anAggregateException, resetshasInitializedinfinallyso re-subscription works after any termination, and adds anObjectDisposedExceptionguard.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: