for i in {1..260}
do
nats consumer add --pull --filter="fantest-stream-3.fantest-consumer-$i" \
--deliver=all --ack=explicit --replay=instant --replicas=1 \
--max-deliver=-1 --max-pending=1000 --no-headers-only --backoff=linear \
fantest-stream-3 fantest-consumer-$i
done
Request $JS.API.CONSUMER.LIST.fantest-stream-3. It says total is 256.
nats request '$JS.API.CONSUMER.LIST.fantest-stream-3' ''
14:32:54 Sending request on "$JS.API.CONSUMER.LIST.fantest-stream-3"
14:32:55 Received with rtt 1.135441952s
{"type":"io.nats.jetstream.api.v1.consumer_list_response","total":256,"offset":0,"limit":256,"consumers":[......
nats consumer ls fantest-stream-3 can list all the 260 consumers.
Given the capability you are leveraging, describe your expectation?
nats request '$JS.API.CONSUMER.LIST.fantest-stream-3' '' should return the correct total size.
Given the expectation, what is the defect you are observing?
The API returning incorrect total size causes our code (which uses the go and python libs) to not get the full list of consumers.
What version were you using?
Server info: (returned by
nats server info
)Client (nats-cli) info:
What environment was the server running in?
Kubernetes (GKE version
1.24.14-gke.2700
)Is this defect reproducible?
Yes. To reproduce:
Create a new stream with the given json file.
test-stream.json:
Create 260 consumers in the stream.
Request
$JS.API.CONSUMER.LIST.fantest-stream-3
. It says total is 256.nats consumer ls fantest-stream-3
can list all the 260 consumers.Given the capability you are leveraging, describe your expectation?
nats request '$JS.API.CONSUMER.LIST.fantest-stream-3' ''
should return the correct total size.Given the expectation, what is the defect you are observing?
The API returning incorrect total size causes our code (which uses the go and python libs) to not get the full list of consumers.