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

Exceptions thrown inside of SubFlow don't cancel entire stream when using SupervisionStrategy.Stop #221

Closed
mdedetrich opened this issue May 10, 2022 · 1 comment · Fixed by #223
Labels
bug Something isn't working upstream Issues that require changes/co-operation with upstream libraries/projects

Comments

@mdedetrich
Copy link
Contributor

What happened?

Whenever an exception is thrown in a SubFlow (i.e. as a result of using splitAfter for creating sub flows based on time slice) it does not respect the configured actor supervision strategy which means instead of the stream being terminated (which is what you would expect), it just repeats itself indefinitely.

What did you expect to happen?

If an exception is thrown inside a SubFlow it should cancel the parent stream which should propagate and cancel all substreams.

What else do we need to know?

Upstream issue/comment is here akka/akka#23066 (comment)

@mdedetrich mdedetrich added bug Something isn't working upstream Issues that require changes/co-operation with upstream libraries/projects labels May 10, 2022
@mdedetrich
Copy link
Contributor Author

mdedetrich commented May 10, 2022

So it turns out it is possible to cancel the parent stream when an exception is thrown, its just that you need to use a custom SubstreamCancelStrategy (it defaults to .drain where as we want .propagate). Its kind of weird that for this specific Flow operator it ignores the SupervisionStrategy so an upstream ticket was created at akka/akka#31394.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issues that require changes/co-operation with upstream libraries/projects
Projects
None yet
1 participant