class LavinMQ::StreamQueue::StreamQueueMessageStore

Defined in:

lavinmq/queue/stream_queue_message_store.cr

Constructors

Instance Method Summary

Instance methods inherited from class LavinMQ::Queue::MessageStore

[](sp : SegmentPosition) : BytesMessage [], avg_bytesize : UInt32 avg_bytesize, bytesize : UInt64 bytesize, close : Nil close, delete(sp) : Nil
delete
delete
, empty? empty?, empty_change : Channel(Bool) empty_change, first? : Envelope | Nil first?, purge(max_count : Int = UInt32::MAX) : UInt32 purge, push(msg) : SegmentPosition push, requeue(sp : SegmentPosition) requeue, shift?(consumer = nil) : Envelope | Nil shift?, size : UInt32 size, unmap_segments(except : Enumerable(UInt32) = StaticArray(UInt32, 0).new(0_u32)) unmap_segments

Constructor methods inherited from class LavinMQ::Queue::MessageStore

new(data_dir : String, replicator : Replication::Server | Nil) new

Constructor Detail

def self.new(data_dir : String, replicator : Replication::Server | Nil) #

[View source]

Instance Method Detail

def delete(sp) : Nil #

[View source]
def drop_overflow #

[View source]
def find_offset(offset) : Tuple(Int64, UInt32, UInt32) #

Used once when a consumer is started Populates segment and position by iterating through segments until offset is found


[View source]
def last_offset : Int64 #

[View source]
def max_age : Time::Span | Time::MonthSpan | Nil #

[View source]
def max_age=(max_age : Time::Span | Time::MonthSpan | Nil) #

[View source]
def max_length : Int64 | Nil #

[View source]
def max_length=(max_length : Int64 | Nil) #

[View source]
def max_length_bytes : Int64 | Nil #

[View source]
def max_length_bytes=(max_length_bytes : Int64 | Nil) #

[View source]
def new_messages : Channel(Bool) #

[View source]
def purge(max_count : Int = UInt32::MAX) : UInt32 #
Description copied from class LavinMQ::Queue::MessageStore

Deletes all "ready" messages (not unacked)


[View source]
def push(msg) : SegmentPosition #

[View source]
def shift?(consumer : Client::Channel::StreamConsumer) : Envelope | Nil #

[View source]