Search Results for

    Show / Hide Table of Contents

    Class MergeHub

    A MergeHub is a special streaming hub that is able to collect streamed elements from a dynamic set of producers. It consists of two parts, a Source<TOut, TMat> and a Sink<TIn, TMat>. The Source<TOut, TMat> streams the element to a consumer from its merged inputs. Once the consumer has been materialized, the Source<TOut, TMat> returns a materialized value which is the corresponding Sink<TIn, TMat>. This Sink<TIn, TMat> can then be materialized arbitrary many times, where each of the new materializations will feed its consumed elements to the original Source<TOut, TMat>.

    Inheritance
    object
    MergeHub
    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 MergeHub

    Methods

    | Edit this page View Source

    Source<T>()

    Creates a Source<TOut, TMat> that emits elements merged from a dynamic set of producers. After the Source<TOut, TMat> returned by this method is materialized, it returns a Sink<TIn, TMat> as a materialized value. This Sink<TIn, TMat> can be materialized arbitrary many times and each of the materializations will feed the elements into the original Source<TOut, TMat>.

    Every new materialization of the Source<TOut, TMat> results in a new, independent hub, which materializes to its own Sink<TIn, TMat> for feeding that materialization.

    If one of the inputs fails the Sink<TIn, TMat>, the Source<TOut, TMat> is failed in turn (possibly jumping over already buffered elements). Completed Sink<TIn, TMat>s are simply removed. Once the Source<TOut, TMat> is cancelled, the Hub is considered closed and any new producers using the Sink<TIn, TMat> will be cancelled.

    Declaration
    public static Source<T, Sink<T, NotUsed>> Source<T>()
    Returns
    Type Description
    Source<T, Sink<T, NotUsed>>

    TBD

    Type Parameters
    Name Description
    T

    TBD

    | Edit this page View Source

    Source<T>(int)

    Creates a Source<TOut, TMat> that emits elements merged from a dynamic set of producers. After the Source<TOut, TMat> returned by this method is materialized, it returns a Sink<TIn, TMat> as a materialized value. This Sink<TIn, TMat> can be materialized arbitrary many times and each of the materializations will feed the elements into the original Source<TOut, TMat>.

    Every new materialization of the Source<TOut, TMat> results in a new, independent hub, which materializes to its own Sink<TIn, TMat> for feeding that materialization.

    If one of the inputs fails the Sink<TIn, TMat>, the Source<TOut, TMat> is failed in turn (possibly jumping over already buffered elements). Completed Sink<TIn, TMat>s are simply removed. Once the Source<TOut, TMat> is cancelled, the Hub is considered closed and any new producers using the Sink<TIn, TMat> will be cancelled.

    Declaration
    public static Source<T, Sink<T, NotUsed>> Source<T>(int perProducerBufferSize)
    Parameters
    Type Name Description
    int perProducerBufferSize

    Buffer space used per producer. Default value is 16.

    Returns
    Type Description
    Source<T, Sink<T, NotUsed>>

    TBD

    Type Parameters
    Name Description
    T

    TBD

    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