Skip to main content
Package: WestyxNexus.Extensions.Configuration (v0.13.0+) The SDK’s packages compose, and one call wires them. builder.AddWestyxNexus(config) creates a single NexusClient, serves IConfiguration from it, and registers it in the container - so config binding, secrets binding, feature management and an injected client all read one cache, behind one sync loop and one SSE connection.
One class can take a config value and a secret at the same time. Configure<T>(section) fills the properties backed by Nexus configs, AddWestyxNexusSecrets<T>(prefix) fills the ones backed by secrets, and each writes only what it matched:
The client is disposed with the host.

Which entry point to use

builder.Configuration.AddWestyx(config) serves IConfiguration only: the client it creates stays inside the configuration provider, and the container never sees it - which is why AddWestyxNexusSecrets<T>() and AddWestyxNexusFeatureManagement() cannot be added next to it on their own. services.AddWestyxNexus(...) is the mirror image: it serves the container only.
Calling both wires two independent clients - two initial syncs, two TTL poll loops and two SSE connections, so one application consumes two of the service’s connection slots. builder.AddWestyxNexus(config) exists to avoid exactly that, and rejects a second client registration rather than silently choosing one.

What the one-call path gives up

The configuration provider needs Nexus data while IConfiguration is being built, which is before a service provider exists. The client is therefore created there, with a blocking initial sync - the same thing builder.Configuration.AddWestyx(config) has always done. Two consequences follow:
  • IHttpClientFactory is not used. The client owns its own HttpClient, so handler rotation and any AddHttpClient policies do not apply to it. NexusConfig.PooledConnectionLifetime (default 2 minutes) is what keeps its DNS observations fresh.
  • The application’s ILoggerFactory is not attached automatically, because it does not exist yet. Set NexusConfig.LoggerFactory to route SDK diagnostics.
If you do not need Nexus values in IConfiguration, prefer services.AddWestyxNexus(...): it wires IHttpClientFactory and the application’s logging, and its initial sync runs asynchronously during host startup.

Parameters