struct NATS::JetStream::ConsumerConfig

Defined in:

jetstream/consumer_config.cr

Constructors

Instance Method Summary

Constructor methods inherited from struct NATS::JetStream::Entity

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(deliver_subject : Nil | String = nil, durable_name : Nil | String = nil, ack_policy : AckPolicy = :explicit, deliver_policy : DeliverPolicy = :all, replay_policy : ReplayPolicy = :instant, ack_wait : Time::Span | Nil = nil, filter_subject : Nil | String = nil, max_deliver = nil, opt_start_seq : Int64 | Nil = nil, sample_frequency : Nil | String = nil, opt_start_time : Time | Nil = nil, rate_limit_bps : UInt64 | Nil = nil, max_ack_pending : Int | Nil = nil, max_waiting : Int | Nil = nil, idle_heartbeat : Time::Span | Nil = nil, flow_control : Bool | Nil = nil, deliver_group : Nil | String = durable_name, max_request_batch : Int32 | Nil = nil, max_request_expires : Time::Span | Nil = nil, max_request_max_bytes : Int32 | Nil = nil, replicas : Int32 = 0, memory_storage : Bool | Nil = nil, inactive_threshold : Time::Span | Nil = nil) #

[View source]

Instance Method Detail

def ack_policy : AckPolicy #

How messages should be acknowledged: none, all, or explicit


[View source]
def ack_wait : Time::Span | Nil #

[View source]
def deliver_group : String | Nil #

[View source]
def deliver_policy : DeliverPolicy #

The initial starting mode of the consumer: all, last, new, by-start_sequence or by_start_time


[View source]
def deliver_subject : String | Nil #

The subject to deliver observed messages, when not set, a pull-based Consumer is created


[View source]
def description : String | Nil #

[View source]
def durable_name : String | Nil #

The name of the Consumer, specifying this will persist the consumer to the NATS server


[View source]
def filter_subject : String | Nil #

When consuming from a Stream with many subjects, or wildcards, select only a specific incoming subjects, supports wildcards


[View source]
def flow_control? : Bool #

[View source]
def headers_only? : Bool #

[View source]
def idle_heartbeat : Time::Span | Nil #

[View source]
def inactive_threshold : Time::Span | Nil #

[View source]
def max_ack_pending : Int64 | Nil #

The maximum number of messages without acknowledgement that can be outstanding, once this limit is reached message delivery will be suspended


[View source]
def max_deliver : Int64 | Nil #

Maximum number of times a message will be delivered via this consumer. Use this to avoid poison pills crashing all your services forever.


[View source]
def max_request_batch : Int32 | Nil #

[View source]
def max_request_expires : Time::Span | Nil #

[View source]
def max_request_max_bytes : Int32 | Nil #

[View source]
def max_waiting : Int64 | Nil #

[View source]
def memory_storage? : Bool | Nil #

[View source]
def opt_start_seq : Int64 | Nil #

When first consuming messages from the Stream start at this particular message in the set


[View source]
def opt_start_time : Time | Nil #

OptStartTime When first consuming messages from the Stream start with messages on or after this time


[View source]
def rate_limit_bps : UInt64 | Nil #

The rate of message delivery in bits per second


[View source]
def replay_policy : ReplayPolicy #

How messages are sent: instant (default) or original


[View source]
def replicas : Int32 #

[View source]
def sample_frequency : String | Nil #

What percentage of acknowledgements should be samples for observability, 0-100


[View source]