struct NATS::JetStream::API::V1::Streams
- NATS::JetStream::API::V1::Streams
- Struct
- Value
- Object
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.crConstructors
Instance Method Summary
-
#create(storage : API::V1::StreamConfig::Storage, retention : API::V1::StreamConfig::RetentionPolicy | 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. -
#delete(stream : String)
Delete the stream with the given name
-
#delete(stream : JetStream::API::V1::Stream)
Delete the given stream
- #get_msg(stream : String, *, last_by_subject : String)
- #get_msg(stream : String, *, sequence : String)
-
#info(name : String) : NATS::JetStream::API::V1::Stream | Nil
Get the current state of the stream with the given
name -
#list
List all available streams
Constructor Detail
Instance Method Detail
def create(storage : API::V1::StreamConfig::Storage, retention : API::V1::StreamConfig::RetentionPolicy | 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.
def info(name : String) : NATS::JetStream::API::V1::Stream | Nil
#
Get the current state of the stream with the given name