enqueueMany method
Adds multiple WaitingMessage objects to the queue at once.
messages: A list of messages to enqueue.
All messages are appended to the end of the waitingMessages list
in the order they appear in the provided list.
Implementation
void enqueueMany(List<WaitingMessage> messages) {
waitingMessages.addAll(messages);
}