Search Results for

    Show / Hide Table of Contents

    Class IntervalBasedRateLimiter

    Inheritance
    object
    IntervalBasedRateLimiter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Streams.Dsl
    Assembly: Akka.Streams.dll
    Syntax
    public static class IntervalBasedRateLimiter

    Methods

    | Edit this page View Source

    Create<T>(TimeSpan, int)

    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.

    int 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

    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET