Alumna::Nats::JetStream
Constructors
Instance methods
Acknowledge the message. The handler does not ack when it returns.
Return the consumer, or nil if it does not exist.
Create a durable push consumer. Does not create a stream. Default deliver_group is name so workers on this consumer compete. Default deliver_subject is generated from the stream and consumer names. Deliver policy is all: a late consumer receives stored messages. Optional ack_wait is how long an unacked message waits before redelivery. On a workqueue stream, one consumer per interest. Extra overlapping consumers return Error. Workers share this consumer.
Create a stream. name must not be empty and must not contain '.'.
Default retention is limits. Pass :workqueue for the job queue:
the first ack removes the message, and a second consumer on the same
interest returns Error.
Remove the consumer. If the consumer does not exist, this is a no-op.
Remove the stream. If the stream does not exist, this is a no-op.
Reject the message so the server can deliver it again. delay waits before the next delivery.
Publish to a stream that already listens on subject. If no stream listens, return Error. This does not create a stream.
Return the stream, or nil if it does not exist.
Push subscribe. Does not block. Does not create a consumer. Does not ack. consumer must have a deliver subject (push). Pull consumers raise ArgumentError.