Class SubscriptionHealthSweeperHostedService
Periodically probes every subscriber with a heartbeat write and evicts the ones whose channel stays full or closed: their clients are gone or stuck.
public sealed class SubscriptionHealthSweeperHostedService : BackgroundService, IHostedService, IDisposable
- Inheritance
-
SubscriptionHealthSweeperHostedService
- Implements
- Inherited Members
Constructors
SubscriptionHealthSweeperHostedService(TopicDaprSubscriptionRegistry, ILogger<SubscriptionHealthSweeperHostedService>)
public SubscriptionHealthSweeperHostedService(TopicDaprSubscriptionRegistry registry, ILogger<SubscriptionHealthSweeperHostedService> logger)
Parameters
registryTopicDaprSubscriptionRegistryloggerILogger<SubscriptionHealthSweeperHostedService>
Methods
ExecuteAsync(CancellationToken)
This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingTokenCancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.