struct

NATS::JetStream::Consumers

Inherits Struct / Value / Object

A NATS JetStream consumer is a message index sourced from a stream. It can apply additional filters and records which messages are pending, acknowledged, etc, at the consumer layer.

Constructors

new(nats : NATS::Client)
Source

Instance methods

create(stream_name : String, deliver_policy : ConsumerConfig::DeliverPolicy = :all, ack_policy : ConsumerConfig::AckPolicy = :explicit, **properties) : Consumer

Create a consumer for the given stream with the given properties, which are passed unmodified to NATS::JetStream::Consumer.new.

Source
delete(stream : JetStream::Stream, consumer : JetStream::Consumer)

Delete the given consumer for the given stream

Source
delete(stream : String, consumer : String)

Delete the consumer with the given name associated with the stream with the given name.

Source
delete(consumer : JetStream::Consumer)

Delete the given consumer for the given stream

Source
info(stream_name : String, name : String) : Consumer | Nil
Source
info(stream_name : String, name : String, &)

Return the consumer with the specified name associated with the given stream, yielding to the block if the consumer does not exist

Source
info!(stream_name : String, name : String) : Consumer

Return the consumer with the specified name associated with the given stream, yielding to the block if the consumer does not exist

Source
list(stream : JetStream::Stream)

Returns a paginated list of consumers for the specified stream.

Source
list(stream_name : String)

Returns a paginated list of consumers for the stream with the specified name.

Source