throttle
Limit the throughput to a specific number of elements per time unit, or a specific total cost per time unit, where a function has to be provided to calculate the individual cost of each element.
Signature
def throttle(elements: Int, per: FiniteDuration): Repr[Out]
def throttle(elements: Int, per: FiniteDuration, maximumBurst: Int, mode: ThrottleMode): Repr[Out]
def throttle(cost: Int, per: FiniteDuration, costCalculation: (Out) => Int): Repr[Out]
def throttle(cost: Int,per: FiniteDuration,maximumBurst: Int,costCalculation: (Out) => Int,mode: ThrottleMode): Repr[Out]
Description
Limit the throughput to a specific number of elements per time unit, or a specific total cost per time unit, where a function has to be provided to calculate the individual cost of each element.
emits when upstream emits an element and configured time per each element elapsed
backpressures when downstream backpressures
completes when upstream completes