Skip to content

Class NatsDataEngineBuilderExtensions

Namespace: Cephalon.Data.Nats.Registration
Assembly: Cephalon.Data.Nats.dll

Registers the NATS JetStream ledger-store data companion pack with an .

public static class NatsDataEngineBuilderExtensions

objectNatsDataEngineBuilderExtensions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

AddNatsData(EngineBuilder, string, Action<NatsDataOptions>?)

Section titled “ AddNatsData(EngineBuilder, string, Action<NatsDataOptions>?)”

Adds the NATS data pack with the supplied server URL.

public static EngineBuilder AddNatsData(this EngineBuilder builder, string uri, Action<NatsDataOptions>? configure = null)

builder EngineBuilder

The engine builder to extend.

uri string

The NATS server URI (e.g. “nats://localhost:4222”).

configure Action<NatsDataOptions>?

An optional callback that configures the host-owned NATS pack options.

EngineBuilder

The same engine builder for fluent composition.

Register outbox or inbox support by configuring or in the configure callback.

does not connect on construction — the connection is deferred to the first operation. DI resolution does not require a live NATS server.

AddNatsData(EngineBuilder, Action<NatsDataOptions>)

Section titled “ AddNatsData(EngineBuilder, Action<NatsDataOptions>)”

Adds the NATS data pack using an options callback that can bind from configuration.

public static EngineBuilder AddNatsData(this EngineBuilder builder, Action<NatsDataOptions> configure)

builder EngineBuilder

The engine builder to extend.

configure Action<NatsDataOptions>

The callback that configures the host-owned NATS pack options, including and .

EngineBuilder

The same engine builder for fluent composition.

Use either or . Leaving both unset falls back to nats://localhost:4222.