Skip to main content
Version: 2.11

Snapshot Stream

Creates a snapshot of a stream.

Subject

$JS.API.STREAM.SNAPSHOT.{stream}

Where {stream} is the name of the stream.

Request

A request to the JetStream $JS.API.STREAM.SNAPSHOT API

deliver_subjectstringrequired
The NATS subject where the snapshot will be delivered
Min length:1
no_consumersboolean
When true consumer states and configurations will not be present in the snapshot
chunk_sizeinteger
The size of data chunks to send to deliver_subject
integer with a dynamic bit size depending on the platform the cluster runs on, can be up to 64bit
Minimum:1024
Maximum:9223372036854776000
jsckboolean
Check all message's checksums prior to snapshot
Default:false

Response

A response from the JetStream $JS.API.STREAM.SNAPSHOT API

One of the following:
Option 1 (object)
errorobjectrequired
Option 2 (object)
configobjectrequired
stateobjectrequired
typeconst: "io.nats.jetstream.api.v1.stream_snapshot_response"