Skip to main content

AdapterPoolMemberConfigurationGuard

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

Binds AdapterPoolMemberOptions and refuses to start a process that was told to be a pool member but did not become one (AB#5303 item 5).

public static class AdapterPoolMemberConfigurationGuard

Inheritance Object → AdapterPoolMemberConfigurationGuard

Remarks:

🔴 The failure this exists for is silent by construction. Being a pool member is decided by AdapterPoolMemberOptions.IsEnabled, which reads the very options that can fail to bind. When they do, nothing is missing from the process's point of view: it composes as an ordinary adapter, comes up 1/1 Ready, passes its health check and is not a pool member. Observed on a local kind cluster, where the chart emitted OCTO_ADAPTERPOOL__POOLTENANTID while the SDK binds AdapterPoolTenantId — the pod logged AdapterRtId NULL and joined the plain adapter hub. The chart was fixed (octo-mesh-adapter 75b14a2); this is the half that makes the next such drift loud instead of invisible.

The independent signal is the section, not the properties. A configured-but-unbound member still puts its keys into AdapterPool; only their names are wrong. So: keys present with values, yet AdapterPoolMemberOptions.IsEnabled false, means the deployment asked for a member and the binding did not deliver one. An empty section is not a claim and stays a plain adapter — which is what every dedicated adapter has.

Methods​

BindAndVerify(IConfiguration)​

Binds the AdapterPool section and throws when it is configured but does not yield a usable member configuration.

public static AdapterPoolMemberOptions BindAndVerify(IConfiguration configuration)

Parameters​

configuration IConfiguration

Returns​

AdapterPoolMemberOptions

Exceptions​

AdapterException
The section carries values and AdapterPoolMemberOptions.IsEnabled is still false — the process would degrade into an ordinary adapter.

EnvironmentVariableFor(String)​

The environment variable an AdapterPool property is read from.

internal static string EnvironmentVariableFor(string propertyName)

Parameters​

propertyName String

Returns​

String