如何使用 OverflowStrategy 在流中打印丢弃的元素?

How to print dropped elements in a stream with OverflowStrategy?

有没有办法在使用 OverflowStrategy.dropHead or OverflowStrategy.dropTail 时打印流中丢弃的元素?

如果 akka.stream.impl.ActorRefSourceActor can be of any help there are these two cases 在 receive:

    case DropHead ⇒
      buffer.dropHead()
      buffer.enqueue(elem)
    case DropTail ⇒
      buffer.dropTail()
      buffer.enqueue(elem)

我认为它排除了在删除之前打印元素的可能性。