If you need to consume messages from a number of Sources that are created at run time you probably need to use a MergeHub http://doc.akka.io/docs/akka/2.4/scala/stream/stream-dynamic.html#dynamic-fan-in-and-fan-out-with-mergehub-and-broadcasthub
cheers, Rafał W dniu czwartek, 8 grudnia 2016 21:21:08 UTC+1 użytkownik [email protected] napisał: > > Hi, > > I'm creating a Source via GraphStageLogic which makes calls to another > api, which happens to return a Source. However I'm unsure how to deal with > Source/Futures in a GraphStageLogic. It seems that I want my shape to look > like > > val shape: SourceShape[Seq[String]] = SourceShape(out) > > > but I get back a Source[ByteString, NotUsed] which I can covert to > Future[Seq[String]] > via runWith(Sink.seq). So should I make my shape > > val shape: SourceShape[Future[Seq[String]]] = SourceShape(out) > > > But then I need to materialize the Source inside the onPull(), which > doesn't seem right. Is there a better way to handle this situation? > > 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.
