Skip to main content

MetadataRegistryOptions

Defined in: src/interfaces/options.interface.ts:142

Configuration for the handler metadata KV registry.

When any handler has meta in its extras, the transport writes metadata entries to a NATS KV bucket at startup. External services (API gateways, dashboards) can watch the bucket for service discovery.

All fields are optional — sensible defaults are applied.

Properties

bucket?

optional bucket?: string

Defined in: src/interfaces/options.interface.ts:147

KV bucket name.

Default

'handler_registry'

replicas?

optional replicas?: number

Defined in: src/interfaces/options.interface.ts:154

Number of KV bucket replicas. Must be an odd number (1, 3, 5, 7, ...). Requires a NATS cluster with at least this many nodes.

Default

1

ttl?

optional ttl?: number

Defined in: src/interfaces/options.interface.ts:165

KV bucket TTL in milliseconds.

Entries expire automatically unless refreshed by a heartbeat. The transport refreshes entries every ttl / 2 while the pod is alive. When the pod stops (graceful or crash), entries expire after this duration.

Default

30_000 (30 seconds)