struct NATS::JetStream::API::V1::Streams

Overview

A stream in NATS JetStream represents the history of messages pertaining to a given domain. When you publish a message to a subject that a stream is monitoring, the stream then adds that message to its history in the order it was published.

Defined in:

jetstream.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def create(storage : StreamConfig::Storage, retention : StreamConfig::RetentionPolicy | Nil = nil, discard : StreamConfig::DiscardPolicy | Nil = nil, **kwargs) #

Create a stream of the given storage type and with the given properties, which are passed unmodified to NATS::JetStream::API::V1::StreamConfig.new.


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

Delete the stream with the given name


[View source]
def delete(stream : JetStream::API::V1::Stream) #

Delete the given stream


[View source]
def get_msg(stream : String, *, last_by_subject : String) #

[View source]
def get_msg(stream : String, *, sequence : Int) #

[View source]
def info(name : String) : Stream | Nil #

Get the current state of the stream with the given name


[View source]
def list(subject : String | Nil = nil) #

List all available streams


[View source]
def purge(stream : String, subject : String) : Int64 #

[View source]