Class ConsumerProgress
Consumers' positions on topics, as reported through Pubsub.ReportProgress
on any gateway pod (shared over ConsumerProgressListener), and the
wait of a paced publish on them. In memory: a pod that starts knows every live
consumer within one report interval.
public sealed class ConsumerProgress
- Inheritance
-
ConsumerProgress
- Inherited Members
Constructors
ConsumerProgress(PubsubPaceOptions, ILogger<ConsumerProgress>, TimeProvider?)
Consumers' positions on topics, as reported through Pubsub.ReportProgress
on any gateway pod (shared over ConsumerProgressListener), and the
wait of a paced publish on them. In memory: a pod that starts knows every live
consumer within one report interval.
public ConsumerProgress(PubsubPaceOptions options, ILogger<ConsumerProgress> logger, TimeProvider? clock = null)
Parameters
optionsPubsubPaceOptionsloggerILogger<ConsumerProgress>clockTimeProvider
Properties
Options
public PubsubPaceOptions Options { get; }
Property Value
Methods
Apply(IEnumerable<ConsumerPosition>)
Applies reported positions; wakes every held publish.
public void Apply(IEnumerable<ConsumerPosition> positions)
Parameters
positionsIEnumerable<ConsumerPosition>
Slowest(IEnumerable<string>, string?)
The slowest counting consumer of the topics that lags at or over the
high-water mark, or null. A consumer counts unless it is self,
idle, its lease ran out (it is forgotten) or it stalled.
public ConsumerProgress.Laggard? Slowest(IEnumerable<string> topics, string? self)
Parameters
topicsIEnumerable<string>selfstring
Returns
WaitUntilCaughtUpAsync(IReadOnlyCollection<string>, string?, CancellationToken)
Returns once no counting consumer of the topics lags at or over the high-water mark, re-checking on every report and every Recheck; after MaxWait throws ResourceExhausted naming the slowest consumer.
public Task WaitUntilCaughtUpAsync(IReadOnlyCollection<string> topics, string? self, CancellationToken cancellationToken)
Parameters
topicsIReadOnlyCollection<string>selfstringcancellationTokenCancellationToken