Zum Hauptinhalt springen

AdapterPoolHubRecoveryService

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

The pool member's counterpart of AdapterHubRecoveryService (AB#4924 AP-I5): a member that was registered at the adapter pool hub and stays unregistered for longer than AdapterOptions.HubRegistrationRecoveryTimeout stops its host so the container restarts.

public sealed class AdapterPoolHubRecoveryService : HubRegistrationRecoveryService, IHostedService, IDisposable

Inheritance Object → BackgroundService → HubRegistrationRecoveryService → AdapterPoolHubRecoveryService
Implements IHostedService, IDisposable

Remarks:

A deaf member is worse than a deaf dedicated adapter in one respect: nothing it already knows keeps running. A member has no pipelines of its own between leases, so a member the controller cannot reach does nothing at all — it is simply never leased, while the pod stays 1/1 Running and the borrowers' queues grow. The SignalR client reconnects and AdapterPoolMemberService re-registers on every connect and retries a refused registration on every heartbeat tick; this service is the backstop when neither gets it back.

A lease that is still running when the timeout fires is lost with the process. That is consistent with the controller's view: it interrupted and re-queued that lease the moment the member's connection went away (concept §6, at-least-once).

Properties​

ExecuteTask​

public Task ExecuteTask { get; }

Property Value​

Task

Constructors​

AdapterPoolHubRecoveryService(IAdapterPoolHubClient, IAdapterHubRegistrationState, IOptions<AdapterOptions>, AdapterLifetimeManagement)​

The pool member's counterpart of AdapterHubRecoveryService (AB#4924 AP-I5): a member that was registered at the adapter pool hub and stays unregistered for longer than AdapterOptions.HubRegistrationRecoveryTimeout stops its host so the container restarts.

public AdapterPoolHubRecoveryService(IAdapterPoolHubClient adapterPoolHubClient, IAdapterHubRegistrationState registrationState, IOptions<AdapterOptions> adapterOptions, AdapterLifetimeManagement lifetimeManagement)

Parameters​

adapterPoolHubClient IAdapterPoolHubClient

registrationState IAdapterHubRegistrationState

adapterOptions IOptions<AdapterOptions>

lifetimeManagement AdapterLifetimeManagement

Remarks:

A deaf member is worse than a deaf dedicated adapter in one respect: nothing it already knows keeps running. A member has no pipelines of its own between leases, so a member the controller cannot reach does nothing at all — it is simply never leased, while the pod stays 1/1 Running and the borrowers' queues grow. The SignalR client reconnects and AdapterPoolMemberService re-registers on every connect and retries a refused registration on every heartbeat tick; this service is the backstop when neither gets it back.

A lease that is still running when the timeout fires is lost with the process. That is consistent with the controller's view: it interrupted and re-queued that lease the moment the member's connection went away (concept §6, at-least-once).