Hi Ostap,

to be clear on the interface that Reactive Streams mandate for the control
of the backpressure - it is not the case of telling to the upstream to
"slow down", but rather to "speed up" by signaling more demand to the
upstream.

That being said, there is no direct way of signaling more demand when using
akka-streams. But you can influence how demand is propagated by using
various combinators like:
* buffer(size: Int, overflowStrategy: OverflowStrategy) - which buffers up
elements from faster upstream and then either drops, or backpressures when
full;
* conflate[S](seed: Out ⇒ S)(aggregate: (S, Out) ⇒ S) - applies a function
on every element from upstream, when downstream is not signalling demand;

and others.

On Tue, Dec 16, 2014 at 8:26 PM, Ostap Neko <[email protected]> wrote:
>
> Hi Martynas,
>
> Thanks for you answer. The flow I gave as example is linear for
> simplification purpose, but the flow I really have is using Broadcasts and
> Merges, hence the use of FlowGraph.
> In addition, I process some data in a non-blocking way (using
> mapAsyncUnordered), so I don't see how the upstream could be notified that
> the downstream is still busy if the latter doesn't notify it explicitly.
>
>>  Isn't there a way to reach out for the producer and telling it to "slow
> down"?
>
> Thanks
>
> --
> >>>>>>>>>> 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