akka.net icon indicating copy to clipboard operation
akka.net copied to clipboard

Port remaining "RetryFlow" functionality

Open Danthar opened this issue 2 years ago • 1 comments

Original docs: https://doc.akka.io/docs/akka/current/stream/operators/RetryFlow/withBackoff.html

We currently have the Retry stage which seems to be an initial port of the RetryFlow. https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Streams/Dsl/Retry.cs

Note we have no documentation on that stage on the website, that i could find.

This initial implementation has some issues.

  • Its not named the same as the original RetryFlow in the scala repo. Breaking googlability :P
  • Its missing the backoff behavior https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/scaladsl/RetryFlow.scala

Due to the fact that its missing the backoff behavior i am of the opinion that in its current form its hardly any better then slapping on a SupervisionStrategy which allows you to practically have the same behavior.

.AddAttributes(ActorAttributes.CreateSupervisionStrategy(cause => decider)

Proposal

  • Port the RetryFlow behavior and rename the Retry to RetryFlow.
  • Additionally: Change any public api of the current Retry class to match that of in the Scala repo.
    • Add overloads that use the RestartSettings as used in the RestartFlow. Or decide to make that the only API. Personally i think it would be a lot cleaner to do that, and then also remove the old API from the RestartFlow/Source/Sink api since they have been marked Deprecated for years now.
  • Do not mark as experimental / ApiMayChange per: https://github.com/akka/akka/issues/27960
  • Add docs on the website for this stage
  • Update Specs

Danthar avatar Aug 19 '21 13:08 Danthar

Has this been forgotten?

tomachristian avatar Apr 02 '24 12:04 tomachristian