public function addEvent($payload, $metadata = null)
    {
        $domainEventMessage = new GenericDomainEventMessage(
            $this->aggregateType,
            $this->aggregateId,
            $this->newSequenceNumber(),
            $payload,
            $metadata
        );

        $this->addEventMessage($domainEventMessage);
        return $domainEventMessage;
    }