Have you tried Keep.both, http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/stream-flows-and-basics.html#Combining_materialized_values ?
/Patrik On Mon, Jun 8, 2015 at 8:08 PM, David Hooker <[email protected]> wrote: > Hi all- > > I have a stream defined thus: > > val files = Source.actorPublisher[SourceFile2](DirectoryReader.props( > sourceDir)) > val out = Sink.actorSubscriber[ListBuffer[String]](FileWriter.props( > destinations, destPattern, tmpDir)) > > val stream = files > .map(file => file.data) > .transform { () => new BatchLineGrouper(groupSize) } > .runWith(out) > > > The stream val at this point is the ref to the sink actor. I don't see > how to get the ref to the source actor *and* the sink actor. I can > change the stream to this to get the source, but then don't know how to get > the sink actor: > > > val stream = Flow[SourceFile2] > .map(file => file.data) > .transform { () => new BatchLineGrouper(groupSize) } > .to(out) > .runWith(files) > > > Any clues how I can create such a runnable flow and have refs to both > source and sink actors? > > > > > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
