MCPcopy
hub / github.com/nats-io/nats.go / FetchNoWait

Method FetchNoWait

jetstream/pull.go:890–897  ·  view source on GitHub ↗

FetchNoWait sends a single request to retrieve given number of messages. FetchNoWait will only return messages that are available at the time of the request. It will not wait for more messages to arrive.

(batch int)

Source from the content-addressed store, hash-verified

888// FetchNoWait will only return messages that are available at the time of the
889// request. It will not wait for more messages to arrive.
890func (p *pullConsumer) FetchNoWait(batch int) (MessageBatch, error) {
891 req := &pullRequest{
892 Batch: batch,
893 NoWait: true,
894 }
895
896 return p.fetch(req)
897}
898
899func (p *pullConsumer) fetch(req *pullRequest) (MessageBatch, error) {
900 res := &fetchResult{

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected