where do I find unfold/unfoldAsync ? I looked at http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.3/stages-overview.html? Many Greetings John
Am Mittwoch, 3. Februar 2016 20:51:17 UTC+1 schrieb √: > > I don't see why you'd need to write a custom GraphStage for this. > > unfold/unfoldAsync paired with a buffer with an appropriate dropping > policy should work, no? > > On Wed, Feb 3, 2016 at 8:47 PM, clca <[email protected] <javascript:>> > wrote: > >> Yes this is close to what I need to do. >> The code in the onPull method is something like >> >> val m = ReadFromService(...) >> if(m != null) >> push(out, m) >> >> in a traditional app reading would be done in a loop >> >> while(true) { >> val m = ReadFromService(...) >> //do something with the new message >> } >> >> So I'll add a mechanism in the Source to keep polling the external >> service. >> >> Thanks! >> >> >> On Wednesday, February 3, 2016 at 12:55:16 AM UTC-8, [email protected] >> wrote: >>> >>> I've done something similar. >>> I adapted this JobManager >>> <http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.3/java/stream-integrations.html>. >>> >>> When no data is available( for example when it recieves a Request(16) >>> Messag) it starts a" polling Actor" which polls an external Database for >>> more data. >>> Does this help? >>> >>> Am Mittwoch, 3. Februar 2016 08:33:16 UTC+1 schrieb clca: >>>> >>>> I searched through the topics but I could not find any example on how >>>> to pull from a Source in the case where data is coming in bursts. I built >>>> a >>>> customized Source that read from an external source. Data is coming in >>>> bursts, the flow can stop for a while so I need to keep pulling the Source >>>> in such a way I can keep reading data (the actual read process is done in >>>> the old poll fashion). I guess I need something like a KeepAlive type of >>>> mechanism for the data stream. >>>> >>>> BTW: Fantastic job with Akka, Akka Stream & Akka HTTP! >>>> >>>> Thanks >>>> Claudio >>>> >>>> >>> -- >> >>>>>>>>>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Cheers, > √ > -- >>>>>>>>>> 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.
