Class IntervalBasedRateLimiter
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public static class IntervalBasedRateLimiter
Methods
| Improve this Doc View SourceCreate<T>(TimeSpan, Int32)
Specialized type of rate limiter which emits batches of elements (with size limited by the maxBatchSize
parameter)
with a minimum time interval of minInterval
.
Because the next emit is scheduled after we downstream the current batch, the effective throughput, depending on the minimal interval length, may never reach the maximum allowed one. You can minimize these delays by sending bigger batches less often.
Declaration
public static IGraph<FlowShape<T, IEnumerable<T>>, NotUsed> Create<T>(TimeSpan minInterval, int maxBatchSize)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | minInterval | minimal pause to be kept before downstream the next batch. Should be >= 10 milliseconds. |
Int32 | maxBatchSize | maximum number of elements to send in the single batch |
Returns
Type | Description |
---|---|
IGraph<FlowShape<T, IEnumerable<T>>, NotUsed> |
Type Parameters
Name | Description |
---|---|
T | type of element |