class LavinMQ::Queue::MessageStore
- LavinMQ::Queue::MessageStore
- Reference
- Object
Overview
Message store This handles writing msgs to segments on disk Keeping a list of deleted messages in memory and on disk You can shift through the message store, but not requeue msgs That has to be handled at another layer Writes messages to segments on disk Messages are refered to as SegmentPositions Deleted messages are written to acks.#{segment}
Direct Known Subclasses
- LavinMQ::AMQP::DelayedExchangeQueue::DelayedMessageStore
- LavinMQ::AMQP::PriorityQueue::PriorityMessageStore
- LavinMQ::AMQP::StreamQueue::StreamQueueMessageStore
Defined in:
lavinmq/amqp/queue/message_store.crConstant Summary
-
Log =
LavinMQ::Log.for("message_store")
-
PURGE_YIELD_INTERVAL =
16384
Constructors
Instance Method Summary
- #[](sp : SegmentPosition) : BytesMessage
- #avg_bytesize : UInt32
- #bytesize : UInt64
- #close : Nil
- #delete(sp) : Nil
- #delete
- #delete_file(file)
- #empty?
- #empty_change : Channel(Bool)
- #first? : Envelope | Nil
-
#purge(max_count : Int = UInt32::MAX) : UInt32
Deletes all "ready" messages (not unacked)
- #push(msg) : SegmentPosition
- #requeue(sp : SegmentPosition)
- #shift?(consumer = nil) : Envelope | Nil
- #size : UInt32
- #unmap_segments(except : Enumerable(UInt32) = StaticArray(UInt32, 0).new(0_u32))
Constructor Detail
def self.new(queue_data_dir : String, replicator : Clustering::Replicator | Nil, metadata : ::Log::Metadata = ::Log::Metadata.empty)
#
Instance Method Detail
Deletes all "ready" messages (not unacked)