tg44 commented on issue #980:
URL:
https://github.com/apache/incubator-pekko/issues/980#issuecomment-1900165463
My usecase looks like this;
```
Data Source X
|
\|/
Datas
|
\|/
Process A
|
\|/
wireTap()----> Process FileIO Sink (main, can retry with backoff restart)
| | (if it is restarted with supervision it will fail
at every retry effectively killing the database save)
\|/ | (only switch after the main sink die and restart
up to the max limit)
database save |
|----> fallback Ignore Sink(logging) maybe.
```
I think we don't have a Sink which can handle the right side of the graph.
It could be something like;
```scala
def sinkWithFallback[T, Mat](factory: () => (exception: Option[Throwable])
=> Sink[T, Mat]): Sink[T, Mat]
```
And it should be easily implemented from `lazySink`, but `lazySink` is
internal (or at least the akka version I'm using rn has it in internal), so it
is messy...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]