IAdapterHubRegistrationState
Namespace: Meshmakers.Octo.Sdk.Common.Adapters
Tracks whether this adapter process is currently registered at the communication controller's adapter hub.
public interface IAdapterHubRegistrationState
Remarks:
A live is
not the same thing: the SignalR connection can be up while the controller has no
registration for this adapter, because registration is a hub invoke that can fail on its own
(AB#5409 — five prod-1 adapters sat connected-or-reconnecting but unregistered for eleven
hours; everything the controller has to push — configuration updates, DeployDataFlow,
HTTP-activator calls — silently went nowhere, while the pods stayed 1/1 Running and
both health endpoints answered 200).
Registration is therefore the only signal that means "the controller can reach me", and it is
what the readiness probe and the recovery watchdog are built on.
An adapter pool member uses the same state for its registration at the tenant-free adapter pool hub (AB#4924 AP-I5), written by AdapterPoolClient and read by AdapterPoolHubReadinessHealthCheck and AdapterPoolHubRecoveryService. A process is either one or the other, so one singleton serves both.
Properties
ProcessStartUtc
UTC time this process started. Anchors the readiness grace period.
public abstract DateTime ProcessStartUtc { get; }
Property Value
IsRegistered
True while the last registration attempt succeeded and nothing has invalidated it since.
public abstract bool IsRegistered { get; }
Property Value
HasEverRegistered
True once the adapter registered successfully at least once in this process. The recovery watchdog only arms after that: an adapter that has never registered may be waiting for a tenant that is not enabled yet, and restarting it in a loop would fix nothing.
public abstract bool HasEverRegistered { get; }
Property Value
LastRegisteredUtc
UTC time of the last successful registration, or null if there was none.
public abstract Nullable<DateTime> LastRegisteredUtc { get; }
Property Value
LastFailureMessage
Message of the last failed registration attempt, or null. Surfaced in the health
check output so the reason is visible without digging through a rotated log.
public abstract string LastFailureMessage { get; }
Property Value
Methods
MarkRegistered()
Records a successful registration at the adapter hub.
void MarkRegistered()
MarkNotRegistered(String)
Records that this adapter is not (or no longer) registered.
void MarkNotRegistered(string reason)
Parameters
reason String
Human readable reason, kept for the health check output.