MessageQueue class

Outbound message queue with priority handling and overflow protection

Constructors

MessageQueue({required MessageQueueConfig config, Logger? logger})

Properties

config MessageQueueConfig
final
droppedMessages Stream<QueuedMessage>
Stream of dropped messages
no setter
expiredMessages Stream<QueuedMessage>
Stream of expired messages
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the queue is empty
no setter
isNotEmpty bool
Whether the queue is not empty
no setter
logger → Logger
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Current total size across all priority queues
no setter
totalDropped int
Statistics
no setter
totalExpired int
no setter

Methods

clear() → void
Clear all messages from the queue
close() Future<void>
Close the queue and clean up resources
dequeue() QueuedMessage?
Remove and return the next message from the queue
enqueue(WireMessage message, {MessagePriority priority = MessagePriority.normal}) Future<void>
Add a message to the queue
getCountByPriority() Map<MessagePriority, int>
Get count of messages by priority
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() QueuedMessage?
Peek at the next message without removing it
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited