Hi Luis, On Tue, Mar 3, 2015 at 3:08 PM, Luis Ángel Vicente Sánchez < langel.gro...@gmail.com> wrote:
> Thank you Endre! Yes, I have seen that example. In my use case, workers > are also partial graphs > That does not matter. All Flows are partial graphs with exactly the shape that you use Graph[FlowShape[A, B], Unit]. Flows are just a convenience API for that particular shape. If you use anything that resembles a Flow, then you are better off wrapping it in a Flow. You can even convert a Graph[FlowShape[A, B], Unit] to a Flow: val myFlow = Flow() { implicit b => val g = b.add(myGraph) // myGraph: Graph[FlowShape[A, B], Unit] (g.inlet, g.outlet) } -Endre > and I will use builder.add to import the flow as many times as I need and > let you know if that did the trick. If I found any other problem, I will > simplify my use case so I can just use Flows. > > 2015-03-03 14:03 GMT+00:00 Endre Varga <endre.va...@typesafe.com>: > >> Btw, have you looked at the actual cookbook sample? >> >> >> http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M4/scala/stream-cookbook.html#Balancing_jobs_to_a_fixed_pool_of_workers >> >> On Tue, Mar 3, 2015 at 2:56 PM, Endre Varga <endre.va...@typesafe.com> >> wrote: >> >>> Hi Luis, >>> >>> It should not stuck but throw, but this will not work: >>> >>> >>>> broadcast.out(i) ~> worker ~> merge.in(i) >>>> >>> >>> You imported worker once, you cannot use it N times. You can either use >>> builder.add to add as many times as you need (the parametric import you >>> used only matters if you want to expose the materialized value of the >>> imported element), but since your worker is a Flow, why don't just accept >>> it as a Flow instead of Graph[FlowShape[A, B], Unit]? >>> >>> It is interesting why it hangs though instead of throwing an exception. >>> >>> -Endre >>> >>> >>> >>>> >>>> >>> >>>> With nrOfWorkers > 1, the creation of this partial graph get stuck >>>> after the first iteration. Am I missing something? I was expecting this to >>>> create as many workers as desired. >>>> >>>> Regards, >>>> >>>> Luis >>>> >>>> -- >>>> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. >>>> To post to this group, send email to akka-user@googlegroups.com. >>>> Visit this group at http://groups.google.com/group/akka-user. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> -- >> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. >> To post to this group, send email to akka-user@googlegroups.com. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.