Hi Ostap,

akka-stream is an implementation of Reactive Streams
<http://www.reactive-streams.org/> which have backpressure as the
fundamental idea. Naturally backpressure in akka-stream is implicit and you
should not be seeing problems with out of memory situations.

There could be a problem with the way you are building your stream
processing pipeline. Since your flow seems to be linear, you do not need
FlowGraph. Try defining your pipeline as:

Source.via(Flow1).via(Flow2).runWith(Sink)

and see if it starts working as expected.

On Tue, Dec 16, 2014 at 2:55 PM, Ostap Neko <[email protected]> wrote:
>
> Hi,
>
> I am quite newbie with akka-streams, and haven't yet understood how the
> Flow API integrates with the reactive streams API and the actors API,
> especially with respect to back-pressure.
>
> I have a flow that is designed like so:
>
> FlowGraph { implicit b =>
>   Source ~> Flow1 ~> Flow2 ~> Sink
> }
>
> with the Source ~> Flow1 part producing elements faster than Flow2 ~> Sink
> can consume them, resulting in RAM exhaustion.
> What would be the preferred way of dealing with this situation? How can
> the downstream part notify the upstream part that it needs to slow down,
> and how can the latter react to that?
> It looks like ActorPublisher and ActorSuscriber could be part of the
> solution, but I haven't figured out how to integrate them with the existing
> Flows.
>
> Thanks in advance
>
> --
> >>>>>>>>>> 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.
>


-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

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

Reply via email to