This sounds like two separate questions to me:

1. How to flatten Iterators of DataRow to a stream of DataRows. One thing
to think of here is whether calling next on the Iterator leads to a
blocking call somewhere which you should isolate. Capturing the state in an
object and using Source.unfoldResource to achieve this is probably the
simplest solution, as this is what it is meant for and therefore already
runs on a separate dispatcher.

2. How the StreamConverters.asJavaStream works. It will back pressure and
does not buffer. You can however introduce a buffer in front of it using
Flow.{batchWeighed, conflate, grouped, groupedWithin} to possibly make it a
bit faster.

--
Johan
Akka Team


On Sat, Sep 2, 2017 at 6:56 AM, Bwmat <[email protected]> wrote:

> Also, I'm curious how backpressure works in the created stream, especially
> the child Iterator; does it only buffer one element?
>
> --
> >>>>>>>>>>      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.
>

-- 
>>>>>>>>>>      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.

Reply via email to