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: Add more onErrorXXX stream operators #32279

Open
He-Pin opened this issue Jan 8, 2024 · 0 comments
Open

Feature request: Add more onErrorXXX stream operators #32279

He-Pin opened this issue Jan 8, 2024 · 0 comments

Comments

@He-Pin
Copy link
Member

He-Pin commented Jan 8, 2024

Motivation:
As a daily Java developer , I think the onError* operators are very easy to use, that may not apply to Scaladsl.

eg: spring-projects/spring-framework#31352
refs:reactor/reactor-core#535
refs: #24992

Currently:

Reactor-core Pekko Suggestion
onErrorResume recoverWith
onErrorComplete onErrorComplete ( added )
onErrorReturn recover/recoverWith
onErrorContinue withAttributes(...)
onErrorStop withAttributes/defaultBehavior
onErrorMap mapError

Prons: Easy to use , especially for Java developers.
Cons: More overhead.

And things to notes are:

  1. Even reactor-core think the onErrorContinue is another one billion of mistake, but that will not apply to Akka stream, because the attributes will not leak to all the chains up.
  2. As the Akka stream support add supervision strategy to the final RunnableGraph, not sure if we need add some of these method to the Graph too.
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

No branches or pull requests

1 participant