Skip to main content
Version: 2.11

Get Next Message

Gets next message(s) from a consumer.

Subject

$JS.API.CONSUMER.MSG.NEXT.{stream}.{consumer}

Where {stream} is the stream name and {consumer} is the consumer name.

Request

A request to the JetStream $JS.API.CONSUMER.MSG.NEXT API

expiresinteger
A duration from now when the pull should expire, stated in nanoseconds, 0 for no expiry
nanoseconds depicting a duration in time, signed 64 bit integer
Minimum:-9223372036854776000
Maximum:9223372036854776000
batchinteger
How many messages the server should deliver to the requestor
integer with a dynamic bit size depending on the platform the cluster runs on, can be up to 64bit
Minimum:0
Maximum:256
max_bytesinteger
Sends at most this many bytes to the requestor, limited by consumer configuration max_bytes
integer with a dynamic bit size depending on the platform the cluster runs on, can be up to 64bit
Minimum:0
Maximum:9223372036854776000
no_waitboolean
When true a response with a 404 status header will be returned when no messages are available
idle_heartbeatinteger
When not 0 idle heartbeats will be sent on this interval
nanoseconds depicting a duration in time, signed 64 bit integer
Minimum:-9223372036854776000
Maximum:9223372036854776000