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

Method Drain

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

Drain unsubscribes from the stream and cancels subscription. All messages that are already in the buffer will be processed in callback function.

()

Source from the content-addressed store, hash-verified

63 // Drain unsubscribes from the stream and cancels subscription.
64 // All messages that are already in the buffer will be processed in callback function.
65 Drain()
66
67 // Closed returns a channel that is closed when the consuming is
68 // fully stopped/drained. When the channel is closed, no more messages

Callers 15

drainConnectionMethod · 0.65
DrainMethod · 0.65
TestEncDrainSupportedFunction · 0.65
TestDrainFunction · 0.65
TestDrainQueueSubFunction · 0.65
TestDrainUnSubsFunction · 0.65
TestDrainSlowSubscriberFunction · 0.65
TestDrainConnectionFunction · 0.65
TestDrainConnLastErrorFunction · 0.65

Implementers 3

pushSubscriptionjetstream/push.go
pullSubscriptionjetstream/pull.go
orderedSubscriptionjetstream/ordered.go

Calls

no outgoing calls

Tested by 15

TestEncDrainSupportedFunction · 0.52
TestDrainFunction · 0.52
TestDrainQueueSubFunction · 0.52
TestDrainUnSubsFunction · 0.52
TestDrainSlowSubscriberFunction · 0.52
TestDrainConnectionFunction · 0.52
TestDrainConnLastErrorFunction · 0.52
TestJetStreamSubscribeFunction · 0.52