public function process(EventRecord $eventRecord): void
    {
        $this->eventStore->append($eventRecord);
        $this->eventDispatcher->dispatch($eventRecord->eventMessage());
    }
public function process(EventRecord $eventRecord): void
    {
        $this->eventStore->append($eventRecord);
        $this->eventDispatcher->dispatch($eventRecord->eventMessage());
    }
public function process ( EventRecord $ eventRecord ) : void { $ this -> eventStore -> append ( $ eventRecord ) ; $ this -> eventDispatcher -> dispatch ( $ eventRecord -> eventMessage ( ) ) ; }
Processes an event record

Only dispatches an event if the event store does not throw an exception.

@param EventRecord $eventRecord The event record

@return void

@throws Throwable When an error occurs
Processes an event record