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

Method Next

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

Next retrieves next message on a stream. If MessagesContext is closed (either stopped or drained), Next will return ErrMsgIteratorClosed error. An optional timeout or context can be provided using NextOpt options. If none are provided, Next will block indefinitely until a message is available, itera

(opts ...NextOpt)

Source from the content-addressed store, hash-verified

39 // options. If none are provided, Next will block indefinitely until a
40 // message is available, iterator is closed or a heartbeat error occurs.
41 Next(opts ...NextOpt) (Msg, error)
42
43 // Stop unsubscribes from the stream and cancels subscription. Calling
44 // Next after calling Stop will return ErrMsgIteratorClosed error.

Callers 2

ConsumeMethod · 0.65
MessagesMethod · 0.65

Implementers 2

pullSubscriptionjetstream/pull.go
orderedSubscriptionjetstream/ordered.go

Calls

no outgoing calls

Tested by

no test coverage detected