Sorry, this is actually supported and very straightforward. Solution is: //most common Keep.left case source1.concat(source2)
//more general source1.concatMat(source2)(Keep.both) //or whatever strategy On Thursday, June 23, 2016 at 2:55:11 PM UTC-4, Arron Norwell wrote: > > Hi, > > I'm looking for a good way to concatenate sources while preserving > materialized values. For example, If I have > val source1: Source[T,Mat] = _ > val source2: Source[T,akka.NotUsed] = _ > I would like to be able to preserve the first materialized value (and > possibly more generally, support other means of combination), e.g.: > > > val concatSource: Source[T, Mat] = Source.combine(source1, source2)(Concat > [T]()) > > > It seems difficult to get this to work, because concat discards > materialized values. Is there a good way to approach this? > -- >>>>>>>>>> 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.
