Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface KvLimits
import { type KvLimits } from "https://deno.land/x/natsws@v1.28.0/src/mod.ts";

Properties

description: string

Sets the specified description on the stream of the KV.

replicas: number

Number of replicas for the KV (1,3,or 5).

history: number

Number of maximum messages allowed per subject (key).

max_bytes: number

The maximum number of bytes on the KV

deprecated
maxBucketSize: number
maxValueSize: number

The maximum size of a value on the KV

ttl: number

The maximum number of millis the key should live in the KV. The server will automatically remove keys older than this amount. Note that deletion of delete markers are not performed.

storage: StorageType

The backing store of the stream hosting the KV

placement: Placement

Placement hints for the stream hosting the KV

republish: Republish

Republishes edits to the KV on a NATS core subject.

optional
mirror: StreamSource

Maintains a 1:1 mirror of another kv stream with name matching this property.

optional
sources: StreamSource[]

List of Stream names to replicate into this KV

deprecated
placementCluster: string
backingStore: StorageType

deprecated: use storage FIXME: remove this on 1.8

optional
compression: boolean

Sets the compression level of the KV. This feature is only supported in servers 2.10.x and better.