AdapterOptions
Namespace: Meshmakers.Octo.Sdk.Common.Adapters
Represents the adapter options
public class AdapterOptions
Inheritance Object → AdapterOptions
Fields
UnconfiguredTenantDefault
The AdapterOptions.DedicatedTenantId the constructor applies when nothing configured one.
Callers that have to tell "configured" from "defaulted" apart compare against this —
ConfigureLegacyAdapterTenantId so the deprecated key still wins over it, and
ConfigurePoolMemberAdapterTenantId so it does not warn about a value no operator set.
public static string UnconfiguredTenantDefault;
Properties
InstancePrefix
Gets or sets the prefix for the OctoMesh installation instance.
public string InstancePrefix { get; set; }
Property Value
AdapterRtId
Gets or sets the adapter id
public string AdapterRtId { get; set; }
Property Value
AdapterCkTypeId
Gets or sets the adapter ck id
public string AdapterCkTypeId { get; set; }
Property Value
DedicatedTenantId
The single tenant a dedicated adapter is pinned to — the tenant whose
/{tenantId}/adapterHub route it connects on and whose name goes into
acr_values on its own token.
public string DedicatedTenantId { get; set; }
Property Value
Remarks:
🔴 This replaced TenantId, which was DELETED rather than renamed in place,
and the new name is doing real work (AB#4924, increment 3). A property called
TenantId on a process-wide options object reads like "the tenant", so any
service or node could reach for it instead of the tenant of the work item it was
actually running — and on a shared pool member that answer would be another tenant's,
while looking entirely plausible in a log. Deleting the property turned every such
read into a compile error; this name makes the remaining ones say what they mean.
Use it ONLY for connection-level concerns that genuinely belong to the process: the
hub route, the adapter's own credential, its own unregister-on-shutdown. Anything on
the execution path must use IEtlContext.TenantId inside a node, or
IAdapterTenantScope in the services around the node layer. It is null on a
pool member, which has no tenant of its own — so a mistaken read fails loudly instead
of returning somebody else's tenant.
🔴 That last sentence was a claim, not a fact, until ConfigurePoolMemberAdapterTenantId
made it one. The constructor default below reaches a pool member like any other
process, so an unconfigured member carried "meshTest" and one configured per the
old runbook carried the lending tenant — while executing a borrower's pipeline.
Whatever else changes here, the invariant that has to survive is that a member's value
is null.
⚠️ The legacy environment key OCTO_ADAPTER__TENANTID is still bound, for one
release, with a deprecation warning — eight Helm charts set it and renaming the key
without a window would take the adapter fleet down on upgrade. See
ConfigureLegacyAdapterTenantId.
CommunicationControllerServicesUri
Gets or sets the communication controller services uri
public string CommunicationControllerServicesUri { get; set; }
Property Value
IgnoreCertificateValidation
Gets or sets a value indicating whether the adapter should ignore certificate validation
public bool IgnoreCertificateValidation { get; set; }
Property Value
IssuerUri
Public issuer URI of the identity service the adapter authenticates its own
/{tenantId}/adapterHub connection against (AB#5072). OIDC discovery runs against
it, so it must be the address the identity service itself issues tokens under — not a
cluster-internal service name whose discovery document would advertise a different issuer
than the communication controller validates.
public string IssuerUri { get; set; }
Property Value
Remarks:
⚠️ On octo-mesh-adapter this is a second key next to
Adapter:AuthorityUrl (MeshAdapterConfiguration.AuthorityUrl), which binds
the same configuration section and names the same identity service — but for the
inbound direction (the issuer secured FromHttpRequest@2 routes accept). That
type lives in the adapter repository and is unknown to this SDK, and adapters without it
(Loxone, Modbus, Zenon, the simulation plug) still need an issuer here, so the outbound
credential carries its own key. They normally hold the same value.
ClientId
Client id of the confidential OAuth client representing this adapter (AB#5072). When empty, no token is acquired and the adapter connects to the controller's adapter hub unauthenticated — exactly as every adapter in the estate does today.
public string ClientId { get; set; }
Property Value
ClientSecret
Client secret for AdapterOptions.ClientId. Supply it through a
secretKeyRef-backed environment variable the same way
OCTO_ADAPTER__BROKERPASSWORD is supplied — never as a literal in a values file.
The SDK never writes it to any log, not even truncated.
public string ClientSecret { get; set; }
Property Value
AdditionalValidIssuers
Issuer values accepted in the identity service's discovery document in addition to
AdapterOptions.IssuerUri (AB#5081). Empty by default, i.e. the document's issuer
must equal the address the adapter was pointed at.
public String[] AdditionalValidIssuers { get; set; }
Property Value
Remarks:
Bound from the same Adapter:AdditionalValidIssuers key the inbound direction
already uses (OCTO_ADAPTER__ADDITIONALVALIDISSUERS__0), on purpose: it is the same
fact about the deployment — "this identity service is also known under these names" —
and an adapter that needs it for the tokens it accepts needs it for the token it fetches.
Sharing the key means a split-horizon installation that already works inbound needs no
new setting to work outbound.
The case it exists for: an adapter in a container reaching the host's identity service
as https://mac.local:5003 while that service advertises
https://localhost:5003/. Without it, discovery fails with "Issuer name does not
match authority" and no token is ever acquired.
IsEnabled
Whether enough is configured to attempt a token request at all (AB#5072).
public bool IsEnabled { get; }
Property Value
Remarks:
The secret is deliberately not part of the check — a public client has none, and a confidential client with a missing secret must fail loudly at the token endpoint rather than silently degrade to an anonymous connection that looks healthy until the adapter-hub gate (AB#5063) is armed.
🔴 Unconfigured is a supported state and must stay one. Every adapter in the estate runs without these keys today; a hard requirement here would take the whole fleet down on upgrade. AdapterOptions.DedicatedTenantId is not part of the check either: it always carries a value (the adapter cannot address its own hub route without one) and gating on it would only hide a misconfiguration behind an anonymous connection.
EagerCkModelLoad
When true (the default), the adapter eagerly warms the tenant's CK model cache right
after startup instead of paying the model load on the first pipeline execution
(AB#4920, on-demand lifecycle Epic AB#4914 — after a wake from 0 replicas the first
request would otherwise carry the full model-load latency). The warm-up runs in the
background and never blocks startup or readiness; set to false to restore the pure
lazy-load behaviour (env OCTO_ADAPTER__EAGERCKMODELLOAD=false).
public bool EagerCkModelLoad { get; set; }
Property Value
BrokerHost
Gets or sets the RabbitMQ broker host name
public string BrokerHost { get; set; }
Property Value
BrokerVirtualHost
Gets or sets the RabbitMQ broker virtual host
public string BrokerVirtualHost { get; set; }
Property Value
BrokerPort
Gets or sets the RabbitMQ broker port
public ushort BrokerPort { get; set; }
Property Value
BrokerUsername
Gets or sets the RabbitMQ broker username
public string BrokerUsername { get; set; }
Property Value
BrokerPassword
Gets or sets the RabbitMQ broker password
public string BrokerPassword { get; set; }
Property Value
NlogConfigPath
Gets or sets the NLog configuration file
public string NlogConfigPath { get; set; }
Property Value
MinimumLogLevel
Minimum log level for the adapter, applied centrally by the SDK adapter host so every
adapter shares the same default (Information) instead of the per-repo nlog.config
minlevel="Debug". The host wires NLog with RemoveLoggerFactoryFilter = false
so this Microsoft.Extensions.Logging level actually governs NLog output. Override per
deployment via OCTO_ADAPTER__MINIMUMLOGLEVEL=Debug (no image rebuild needed) when
you need verbose troubleshooting.
public LogLevel MinimumLogLevel { get; set; }
Property Value
LogLevel
UseHostedService
Defines if the adapter should run as hosted service or be started manually (e.g only when a client connects)
public bool UseHostedService { get; set; }
Property Value
MetricsSamplingEnabled
Enables periodic publishing of CPU / memory / thread snapshots to the communication controller (used to drive the UI sparklines). Defaults to true. Set to false on resource-constrained edge adapters to suppress the sampler.
public bool MetricsSamplingEnabled { get; set; }
Property Value
MetricsSamplingIntervalSeconds
Sampling interval in seconds for the adapter metrics sampler. Clamped to at least 1 second; very large values reduce sparkline resolution. Defaults to 10.
public int MetricsSamplingIntervalSeconds { get; set; }
Property Value
HubReadinessProbeEnabled
Makes /healthz/ready report the adapter hub registration (AB#5409). An adapter the
communication controller cannot reach is not ready: configuration updates, data flow
deploys and HTTP-activator calls all go nowhere. Defaults to true; set to false only where
an adapter must keep answering ready without a controller connection.
public bool HubReadinessProbeEnabled { get; set; }
Property Value
HubReadinessGracePeriod
How long after process start an adapter that has not registered at the adapter hub yet still reports ready. Covers the first connect, the token acquisition and a controller that is itself still rolling out, so a fresh pod is never taken out of service before it had a chance to register. Defaults to 5 minutes.
public TimeSpan HubReadinessGracePeriod { get; set; }
Property Value
HubRegistrationRecoveryEnabled
Enables AdapterHubRecoveryService: an adapter that lost its hub registration and does not get it back within AdapterOptions.HubRegistrationRecoveryTimeout stops itself so the container restarts (AB#5409 — a restart repaired every deaf adapter on prod-1, with no configuration change). Only ever arms after a first successful registration in the same process. Defaults to true.
public bool HubRegistrationRecoveryEnabled { get; set; }
Property Value
HubRegistrationRecoveryTimeout
How long an adapter that was registered may stay unregistered before it restarts itself. Deliberately generous — far longer than any reconnect the SignalR client performs on its own — so a short controller rollout never costs a restart. Defaults to 15 minutes.
public TimeSpan HubRegistrationRecoveryTimeout { get; set; }
Property Value
Constructors
AdapterOptions()
Constructor
public AdapterOptions()