Fix from akka.io

This commit is contained in:
Pavel Kachalouski
2025-03-20 09:33:55 +01:00
parent dde793d631
commit bf43cfa408

View File

@@ -12,6 +12,7 @@ import akka.stream.scaladsl.Source
import akka.util.Timeout import akka.util.Timeout
import com.lightbend.cinnamon.akka.stream.CinnamonAttributes import com.lightbend.cinnamon.akka.stream.CinnamonAttributes
import com.lightbend.cinnamon.akka.stream.CinnamonAttributes.GraphWithInstrumented import com.lightbend.cinnamon.akka.stream.CinnamonAttributes.GraphWithInstrumented
import com.lightbend.cinnamon.akka.stream.CinnamonAttributes.FlowWithInstrumented
import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContext
import scala.concurrent.duration._ import scala.concurrent.duration._
@@ -33,14 +34,9 @@ object App {
.via(RestartFlow.onFailuresWithBackoff(restartSettings) { () => .via(RestartFlow.onFailuresWithBackoff(restartSettings) { () =>
Flow[Int] Flow[Int]
.map(identity) .map(identity)
.instrumentedPartial()
.throttle(1, 1.second) .throttle(1, 1.second)
.via(processor1) .via(processor1)
// .map { i =>
// if (i % 100000 == 0) {
// throw new Exception("BOOM!")
// }
// i
// }
}) })
.to(RestartSink.withBackoff(restartSettings) { () => .to(RestartSink.withBackoff(restartSettings) { () =>
Sink.foreach(println) Sink.foreach(println)