protected function getDomainEventMessage(array $document): DomainEventMessageInterface
    {
        $payload = $this
            ->getSerializer()
            ->unserialize(new SerializedObject(
                $document['payload']['name'],
                $document['payload']['data']
            ));

        /** @var PayloadInterface $payload */
        return new DomainEventMessage(
            $payload,
            new PayloadType($payload),
            $document['occurred_on']->toDateTime(),
            $document['aggregate_id'],
            $document['sequence'],
            $document['meta_data']
        );
    }