akka-stream - How to treat the last element of a stream differently in a Flow/Graph

孤街浪徒 提交于 2019-12-04 05:06:57

just found out about intersperse which is exactly what you need, and much simpler than what I suggested in the first place:

http://doc.akka.io/api/akka/2.4.4/index.html#akka.stream.scaladsl.Flow@intersperse[T%3E:Out]%28start:T,inject:T,end:T%29:FlowOps.this.Repr[T]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!