Click or drag to resize
Akka.NETSourceQueueT Method
Creates a SourceTOut, TMat that is materialized as an ISourceQueueWithCompleteT. You can push elements to the queue and they will be emitted to the stream if there is demand from downstream, otherwise they will be buffered until request for demand is received. Depending on the defined OverflowStrategy it might drop elements if there is no space available in the buffer. Acknowledgement mechanism is available. [!:ISourceQueueWithComplete<T>.OfferAsync] returns Task which completes with true if element was added to buffer or sent downstream. It completes with false if element was dropped. The strategy Backpressure will not complete [!:ISourceQueueWithComplete<T>.OfferAsync] until buffer is full. The buffer can be disabled by using bufferSize of 0 and then received messages are dropped if there is no demand from downstream. When bufferSize is 0 the overflowStrategy does not matter.

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public static Source<T, ISourceQueueWithComplete<T>> Queue<T>(
	int bufferSize,
	OverflowStrategy overflowStrategy
)

Parameters

bufferSize
Type: SystemInt32
The size of the buffer in element count
overflowStrategy
Type: Akka.StreamsOverflowStrategy
Strategy that is used when incoming elements cannot fit inside the buffer

Type Parameters

T
TBD

Return Value

Type: SourceT, ISourceQueueWithCompleteT
TBD
Exceptions
ExceptionCondition
ArgumentException This exception is thrown when the specified bufferSize is less than zero.
See Also