Hi
The question is not easy to explain I'll try to do my best
My Flow include a mapConcat Part when I get 1 element and flatten in in
multiple element.
The number of element emitted is variable at this stage. thus 1 in -> n out
.
Now I would like to balance but on n element not on fixed element my code
actually make this
GraphDSL.create() { implicit builder =>
import akka.stream.scaladsl.GraphDSL.Implicits._
val dispatcher = builder.add(Balance[SubRequest](numEngine))
val allResponse = builder.add(Merge[SubResponse](numEngine))
for (i <- dispatcher.outArray.indices) {
dispatcher.out(i) ~> callHttp ~> allResponse.in(i)
}
FlowShape(dispatcher.in, allResponse.out)
}
As you can see I need to fix the number of engine when I materialize the
graph.
Is there any way to do it dynamically based on an element that can varying ?
I don't know if it's a problem in my case I can fix a number and tell if I
fix 10 as numEngine and actually I just pass 2 elements is there expensive
overhead to do this ?
Hope it's clear
Thanks
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.