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 : 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
. -
#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 : Int)
-
#info(name : String) : Stream | Nil
Get the current state of the stream with the given
name
-
#list(subject : String | Nil = nil)
List all available streams
- #purge(stream : String, subject : String) : Int64
Constructor Detail
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
.
Get the current state of the stream with the given name