peek method
Peek at the next message without removing it
Implementation
QueuedMessage? peek() {
_cleanupExpiredMessages();
if (config.priorityEnabled) {
// Check priority queues in order (critical first)
for (final queue in _priorityQueues) {
if (queue.isNotEmpty) {
return queue.first;
}
}
} else {
// Just use normal priority queue
final normalQueue = _priorityQueues[MessagePriority.normal.level];
if (normalQueue.isNotEmpty) {
return normalQueue.first;
}
}
return null;
}