How to print dropped elements in a stream with OverflowStrategy?

154 views Asked by At

Is there a way to print the dropped elements of a stream when using OverflowStrategy.dropHead or OverflowStrategy.dropTail?

1

There are 1 answers

1
Jacek Laskowski On BEST ANSWER

If akka.stream.impl.ActorRefSourceActor can be of any help there are these two cases in receive:

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

I think it crosses out possibility to have the elements printed out before being dropped.