public function store(OutboxMessage $message)
    {
        $messageId = $message->getMessageId();
        if (isset($this->messages[$messageId])) {
            throw new InvalidArgumentException("Outbox message with ID '$messageId' already exists in storage.");
        }

        $this->messages[$messageId] = new InMemoryStoredMessage($messageId, $message->getTransportOperations());
        $this->lastMessageId = $messageId;
    }