Class BatchCollector<TItem>

Assembly: redb.Route.dll

Collects a batch by the contract of : the first message is awaited for
; after it the batch grows until it holds
, until no message came for , or until
has passed since its first message. One implementation for every broker: the
transport supplies only .

public sealed class BatchCollector<TItem>

Inheritance

Object→BatchCollector<TItem>

Methods

CollectAsync(CancellationToken)

Collects one batch. Returns an empty batch when no message came within ,

public Task<CollectedBatch<TItem>> CollectAsync(CancellationToken stop)

Constructors

BatchCollector(BatchOptions, BatchReceive<TItem>, TimeProvider?)

Creates a collector over a transport's receive.