protected function getMongoDocument(DomainEventMessageInterface $domainEventMessage): array
    {
        $payload = $this
            ->getSerializer()
            ->serialize($domainEventMessage->getPayload());

        return [
            'aggregate_id' => $domainEventMessage->getAggregateId(),
            'sequence' => $domainEventMessage->getSequence(),
            'occurred_on' => new UTCDateTime(
                $domainEventMessage
                    ->getOccurredOn()
                    ->format('Uv')
            ),
            'payload' => [
                'name' => $payload->getClassName(),
                'data' => (object)$payload->getData(),
            ],
            'meta_data' => (object)$domainEventMessage->getMetaData(),
        ];
    }