In akka streams, using graph dsl builder i can use balancer, broadcast and merger operators:
Flow.fromGraph(GraphDSL.create() { implicit builder =>
val balancer = builder.add(Balance[Result1](2))
val merger = builder.add(Merge[Result2](2))
balancer.out(0) ~> step1.async ~> step2.async ~> merger.in(0)
balancer.out(1) ~> step1.async ~> step2.async ~> merger.in(1)
FlowShape(balancer.in, merger.out)
}
How i can achieve the same logic using plain Source, Sink and Flow api?
I can do something like this:
source.mapAsync(2)(Future(...))
But, as i see, semanticlly it is not fully equivalent to the first example.