Skip to main content
Version: 2.15 (latest)

Evacuate Peer

Moves a stream and its consumers off one peer. The stream keeps its replica count and the server picks the replacement peer. If no peer qualifies under the stream's placement, the request fails with a peer remap error rather than leaving the group under-replicated.

Subject

$JS.API.STREAM.PEER.EVACUATE.{stream}

Where {stream} is the name of the stream.

Request

A request to the JetStream $JS.API.STREAM.PEER.EVACUATE API

peerstringrequired
Server name or peer ID of the peer to evacuate
Min length:1

Response

A response from the JetStream $JS.API.STREAM.PEER.EVACUATE API

One of the following:
Option 1 (object)
errorobjectrequired
Option 2 (object)
successbooleanrequired
If the peer evacuation was successfully started
Default:false
typeconst: "io.nats.jetstream.api.v1.stream_evacuate_peer_response"