If I understood, it's enough replace map(persistDoc) by via(persistDoc), if persitDoc is a flow. The fold stage is to aggregate the number of persistence operations performed by persistDoc stage. I understood you want to fetch a list of docs related to a profile, persist them and so update the profile if the number of docs persisted. This is the logic executed by the flatMapConcat stage I described previously. Best regards.
On Saturday, November 5, 2016 at 9:41:55 AM UTC-3, Eugene Dzhurinsky wrote: > > So far I understood that *persistDoc* is another function that should > persist something into the appropriate file. However I believe that in my > case it is a flow, that has some source and sink attached, and the sink is > the *FileIO*. > > Basically, I don't see how that is supposed to work out - *FileIO* > doesn't return the number of the performed operations or something like > that. > > 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.
