| BroadcastHubSinkT Method (Int32) |
Creates a
SinkTIn, TMat that receives elements from its upstream producer and broadcasts them to a dynamic set
of consumers. After the
SinkTIn, TMat returned by this method is materialized, it returns a
SourceTOut, TMat as materialized
value. This
SourceTOut, TMat can be materialized arbitrary many times and each materialization will receive the
broadcast elements form the original
SinkTIn, TMat.
Every new materialization of the
SinkTIn, TMat results in a new, independent hub, which materializes to its own
SourceTOut, TMat for consuming the
SinkTIn, TMat of that materialization.
If the original
SinkTIn, TMat is failed, then the failure is immediately propagated to all of its materialized
SourceTOut, TMats (possibly jumping over already buffered elements). If the original
SinkTIn, TMat is completed, then
all corresponding
SourceTOut, TMats are completed. Both failure and normal completion is "remembered" and later
materializations of the
SourceTOut, TMat will see the same (failure or completion) state.
SourceTOut, TMats that are
cancelled are simply removed from the dynamic set of consumers.
Namespace:
Akka.Streams.Dsl
Assembly:
Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public static Sink<T, Source<T, NotUsed>> Sink<T>(
int bufferSize
)
static member Sink :
bufferSize : int -> Sink<'T, Source<'T, NotUsed>>
Parameters
- bufferSize
- Type: SystemInt32
Buffer size used by the producer. Gives an upper bound on how "far" from each other two
concurrent consumers can be in terms of element. If this buffer is full, the producer
is backpressured. Must be a power of two and less than 4096.
Type Parameters
- T
- TBD
Return Value
Type:
SinkT,
SourceT,
NotUsedTBD
See Also