remove method
Removes a specific message from the queue. Returns true if the message was found and removed.
Implementation
bool remove(String messageId) {
final index = _queue.indexWhere((message) => message.id == messageId);
if (index != -1) {
_queue.removeAt(index);
_messageIds.remove(messageId);
return true;
}
return false;
}