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

Method Consume

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

Consume will continuously receive messages and handle them with the provided callback function. Consume can be configured using PullConsumeOpt options: - Error handling and monitoring can be configured using ConsumeErrHandler option, which provides information about errors encountered during consum

(handler MessageHandler, opts ...PullConsumeOpt)

Source from the content-addressed store, hash-verified

135 // Consume returns a ConsumeContext, which can be used to stop or drain
136 // the consumer.
137 Consume(handler MessageHandler, opts ...PullConsumeOpt) (ConsumeContext, error)
138
139 // Messages returns MessagesContext, allowing continuous iteration
140 // over messages in a stream. Messages can be configured using

Callers 15

ConsumeMethod · 0.65
TestConsumerOverflowFunction · 0.65
TestConsumerPinnedFunction · 0.65
TestConsumerPrioritizedFunction · 0.65
TestPushConsumerConsumeFunction · 0.65
TestOrderedConsumerFetchFunction · 0.65
TestOrderedConsumerNextFunction · 0.65
TestOrderedConsumerInfoFunction · 0.65

Implementers 2

pullConsumerjetstream/pull.go
orderedConsumerjetstream/ordered.go

Calls

no outgoing calls

Tested by 15

TestConsumerOverflowFunction · 0.52
TestConsumerPinnedFunction · 0.52
TestConsumerPrioritizedFunction · 0.52
TestPushConsumerConsumeFunction · 0.52
TestOrderedConsumerFetchFunction · 0.52
TestOrderedConsumerNextFunction · 0.52
TestOrderedConsumerInfoFunction · 0.52