Hi, You can use - Source.unfold() ( http://doc.akka.io/api/akka/2.4.4/index.html#akka.stream.scaladsl.Source$@unfold[S,E](s:S)(f:S=>Option[(S,E)]):akka.stream.scaladsl.Source[E,akka.NotUsed]l)
- if you have a non-blocking API, or you can use unfoldResourceAsync ( http://doc.akka.io/api/akka/2.4.4/index.html#akka.stream.scaladsl.Source$@unfoldResourceAsync[T,S](create:()= >scala.concurrent.Future[S],read:S=>scala.concurrent.Future[Option[T]],close:S=>scala.concurrent.Future[akka.Done]):akka.stream.scaladsl.Source[T,akka.NotUsed]) to achieve what you need. If those are not enough, you can build a custom source: http://doc.akka.io/docs/akka/2.4.4/scala/stream/stream-customize.html -Endre On Sat, Apr 16, 2016 at 6:13 AM, Akka user <thisisneha2...@gmail.com> wrote: > Any example code that I can refer where stream Source is external service > which gives bulk records in non reactive stream way, that we have to stream > and manipulate the records via Flow and Sink it to DB? Which pattern of > Akka stream we should use to make the Source? We can query External service > for the records based on Page Size and it would be recursive call to > external service end point to read all the records based on Page Size. > > -- > >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.