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;
    }
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;
    }
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 ; }
Stores the message to enable deduplication and re-dispatching of transport operations.
Throws an exception if a message with the same ID already exists.

@param OutboxMessage $message

@return void
Stores the message to enable deduplication and re - dispatching of transport operations . Throws an exception if a message with the same ID already exists .