Yes, that's the status quo and should be fine to do. We also have some new upcoming infrastructure ( GraphStageWithMaterializedValue <https://github.com/akka/akka/blob/release-2.3-dev/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala#L15>, to be documented soon), that will be coming to Http 1.1 and allow to write complex custom and async and arbitrary number of ports stages (including sinks and sources), as well as providing a materialized value using that API, instead of having to drop down to Publisher/Subscriber level.
Please look forward to it, your feedback about it once we release 1.1 would be really valuable, thanks! Hope this helps, happy hakking! On Sun, Oct 11, 2015 at 1:06 AM, Jan Algermissen <[email protected]> wrote: > > > On Saturday, October 10, 2015 at 11:18:20 PM UTC+2, Konrad Malawski wrote: >> >> >> Since an ActorPublisher can get parameters passed in - it's your Props >> after all - you could simply pass in a Promise to be completed by it for >> example. >> >> > Yeah - thought about that but it somehow felt weird - thanks for clearing > my mind, in fact it's just fine (using a callback now). > > Jan > > > >> -- >> Cheers, >> Konrad 'ktoso’ Malawski >> Akka <http://akka.io> @ Typesafe <http://typesafe.com> >> >> On 10 October 2015 at 23:08:36, Jan Algermissen ([email protected]) >> wrote: >> >> Hi, >> >> I am implementing an ActorPublisher that reads records from a database. >> When the stream is completed I would like to extract some value from the >> actor (for example the maximum of some field of the records processed). >> >> Is there a way to extract such a value from the ActorPublisher once the >> stream has completed (like there is in the ActorSubscriber case)? >> >> Or would I have to fork the stream an calculate such a value using a >> separate (forked-off) flow and sink for it? >> >> Jan >> -- >> >>>>>>>>>> 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. >> >> -- > >>>>>>>>>> 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. > -- Cheers, Konrad 'ktoso' Malawski Akka <http://akka.io/> @ Typesafe <http://typesafe.com/> -- >>>>>>>>>> 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.
