Hi Syed,
You’re right prefixAndTail
would need some examples to show the different use cases.
This example in the current docs for futureFlow
might help you: https://doc.akka.io/docs/akka/current/stream/operators/Flow/futureFlow.html#examples
The idea is to use prefixAndTail(1)
to get access to the first element, extract what you need to create the sink and put it back into the stream to be written.
Cheers,
Enno.