Akka stream Source.queue hangs when using fail overflow strategy
问题 The following Scala snippet doesn't seem to return: val queue = Source.queue[Unit](10, OverflowStrategy.fail) .throttle(1, 1 second, 1, ThrottleMode.shaping) .to(Sink.ignore) .run() Await.result( (1 to 15).map(_ => queue.offer(())).last, Duration.Inf) Is this a bug in Akka streams or am I doing something wrong? EDIT: just to circle back, this bug was opened and accepted in Akka: https://github.com/akka/akka/issues/23078 回答1: This program gives more insight into what happens here: import akka