pekko icon indicating copy to clipboard operation
pekko copied to clipboard

Feature request: Add `Sink#orElse` operator

Open He-Pin opened this issue 1 year ago • 0 comments

Motivation: refs: https://github.com/apache/incubator-pekko/issues/980

There is already a Flow#orElse operator, but we need another one but for Sink. and ZIO has a ZSink.orElse too, which will switch to another sink incase of failure/cancel.

I think we can just add something like that sink#orElse(secondary: Graph[SinkShape]).

Result: An out box of fallback kind thing is covered. I have not check the FS2, but ZIO has this out of box, otherwise ,and an end user you will need to write 100+ lines of code I think.

He-Pin avatar Jan 20 '24 07:01 He-Pin