apache / apache/pekko

Feature request: Add `Sink#orElse` operator

Open
#987 0 comments 1 reaction 0 assignees View on GitHub
t:stream
Dominant language
Scala
Stars
1.6k
Forks
211
Avg merge
1d 6h
Merged PRs (30d)
89

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.