Hi everyone,
I’m using RestartSink.withBackoff
to recover from a sink failures (in my case a MongoSink). Everything works well, when there is an exception while persisting to the db the stream does not fail and the sink restarts. However, I don’t get any logs from the failure. Is there a way to react to the exception that happen in the internal sink (MongoSink), so one can log them and also ensure that db connections are properly terminated?
Just to exemplify with code:
someSource
.log("mongo-recorder")
.to(RestartSink.withBackoff[...](backoffSettings)(
() => MongoSink.insertOne(mongoCollection) // if this dies, stream goes on, but nothing is logged
)