class

NATS::JetStream::PullSubscription

Inherits Reference / Object

Constructors

Instance methods

ack_next(msg : Message, timeout : Time::Span = 2.seconds)

Acknowledge the given message and request the next in a single round trip to the server to save latency.

pull = js.pull_subscribe(consumer)
# Poll for messages until we get one
until msg = pull.fetch(timeout: 30.seconds)
end
loop do
end
Source
ack_next(msg : Message, count : Int, timeout : Time::Span = 2.seconds, no_wait : Bool = false)

Acknowledge the given message and request the next count messages in a single round trip to the server to save latency.

Source
consumer
Source
fetch(timeout : Time::Span = 2.seconds)
Source
fetch(message_count : Int, timeout : Time::Span = 2.seconds, no_wait : Bool = false, max_bytes : Int | Nil = nil) : Enumerable(Message)
Source

Nested types