struct NATS::JetStream::Consumers

Overview

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.

Defined in:

jetstream/consumers.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(nats : NATS::Client) #

[View source]

Instance Method Detail

def 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.


[View source]
def delete(stream : JetStream::Stream, consumer : JetStream::Consumer) #

Delete the given consumer for the given stream


[View source]
def delete(stream : String, consumer : String) #

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


[View source]
def delete(consumer : JetStream::Consumer) #

Delete the given consumer for the given stream


[View source]
def info(stream_name : String, name : String) : Consumer | Nil #

[View source]
def 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


[View source]
def 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


[View source]
def list(stream : JetStream::Stream) #

Returns a paginated list of consumers for the specified stream.


[View source]
def list(stream_name : String) #

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


[View source]