Currently FlowBreaker uses Flow.takeWhile which will terminate the stream when (if) another input element becomes available. An alternative implementation is possible, using akka.stream.stage.AsyncStage that would trigger stream termination immediately after Cancellable.cancel() were called.
Currently
FlowBreaker
usesFlow.takeWhile
which will terminate the stream when (if) another input element becomes available. An alternative implementation is possible, usingakka.stream.stage.AsyncStage
that would trigger stream termination immediately afterCancellable.cancel()
were called.Stages are documented in http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-customize.html Digging into
akka.stream.impl.fusing.MapAsync
implemention would probalby be a good start.