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

Method FetchNoWait

jetstream/consumer.go:120–120  ·  view source on GitHub ↗

FetchNoWait is used to retrieve up to a provided number of messages from a stream. Unlike Fetch, FetchNoWait will only deliver messages that are currently available in the stream and will not wait for new messages to arrive, even if batch size is not met. FetchNoWait is non-blocking and returns Mes

(batch int)

Source from the content-addressed store, hash-verified

118 // does not perform any optimizations (e.g. overlapping pull requests)
119 // and new subscription is created for each execution.
120 FetchNoWait(batch int) (MessageBatch, error)
121
122 // Consume will continuously receive messages and handle them
123 // with the provided callback function. Consume can be configured using

Callers 5

FetchNoWaitMethod · 0.65
TestPurgeStreamFunction · 0.65
TestPullConsumerFetchFunction · 0.65

Implementers 2

pullConsumerjetstream/pull.go
orderedConsumerjetstream/ordered.go

Calls

no outgoing calls

Tested by 4

TestPurgeStreamFunction · 0.52
TestPullConsumerFetchFunction · 0.52