是否可以在 Akka 中从 Source=>Source 函数创建一个 Flow,就像 RxJava/Reactor compose 一样?

Is it possible in Akka to create a Flow from a Source=>Source function, as with RxJava/Reactor compose?

我仍然没有找到在 AkkaStreams 中执行 "filtering" 流的简单方法。使用 fromFunction,执行 "mapping" 流程对我来说很清楚,但执行过滤流程则不然。在 RxJava/Reactor 中有一个在 Flowable/Observable 上的组合运算符,它接受一个函数从一个 Flowable 到另一个 Flowable,所以一个转换可以被描述为一个运算符链,当然还有一个 Source 上的过滤运算符是过滤流所需要的,但我不清楚如何定义过滤流,但显然我很容易过滤源。 请指教

// Filter elements which are even (use the modulo operator: `%`)
def filterEvenValues: Flow[Int, Int, NotUsed] =
  Flow[Int].filter(number => number % 2 == 0)