I would like to flatten a Source[Source[T]] opportunistically, emitting elements of type T as they arrive from any of the inner Sources. This is conceptually similar to a merge vertex <http://doc.akka.io/api/akka-stream-and-http-experimental/1.0-M2/index.html#akka.stream.scaladsl.Merge>, with the added ability to add new input Sources on the fly. I would like to use the flatten method as defined on Source[T] <http://doc.akka.io/api/akka-stream-and-http-experimental/1.0-M2/index.html#akka.stream.scaladsl.Source> to do this, but currently the only FlattenStrategy available is Concat, which, to quote the comments in FlattenStrategy.scala <https://github.com/akka/akka/blob/release-2.3-dev/akka-stream/src/main/scala/akka/stream/FlattenStrategy.scala> :
> * Strategy that flattens a stream of streams by concatenating them. This > means taking an incoming stream > * emitting its elements directly to the output until it completes and then > taking the next stream. This has the > * consequence that *if one of the input stream is infinite, no other > streams after that will be consumed from*. Since the class it extends, abstract class FlattenStrategy[-T, U], has no abstract methods, I assume there's no way to create custom flatten strategies. How would you recommend writing an opportunistic flatten step? -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
