Method ReadAllAsync
- Namespace
- MailFathom.Application.Emails.Embeddings.Generation
- Assembly
- MailFathom.Application.dll
ReadAllAsync(CancellationToken)
Reads waiting messages as they arrive, until the backlog is completed or the caller cancels.
IAsyncEnumerable<StoredEmailId> ReadAllAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenEnds the sequence when the host stops.
Returns
- IAsyncEnumerable<StoredEmailId>
The waiting messages, in the order they were offered.
Remarks
One consumer at a time. A message read from here has been removed from the backlog whether or not embedding it succeeds.