public function getId(): Identity
    {
        if (null === $this->id) {
            throw new PersistentMessageWithoutIdentityException(get_class($this).'::$id has not been initialized');
        }

        return $this->id;
    }