public function receiveCommand(Command $command): void
    {
        $curie = $command::schema()->getCurie();
        $curieStr = $curie->toString();

        if (isset($this->handlers[$curieStr])) {
            $handler = $this->handlers[$curieStr];
        } else {
            try {
                $handler = $this->locator->getCommandHandler($curie);
            } catch (\Throwable $e) {
                $this->locator->getExceptionHandler()->onCommandBusException(new BusExceptionEvent($command, $e));
                return;
            }

            $this->handlers[$curieStr] = $handler;
        }

        try {
            $command->freeze();
            $pbjx = $this->locator->getPbjx();
            $event = new PbjxEvent($command);
            $pbjx->trigger($command, PbjxEvents::SUFFIX_BEFORE_HANDLE, $event, false);
            $handler->handleCommand($command, $pbjx);
            $pbjx->trigger($command, PbjxEvents::SUFFIX_AFTER_HANDLE, $event, false);
        } catch (\Throwable $e) {
            $this->locator->getExceptionHandler()->onCommandBusException(new BusExceptionEvent($command, $e));
        }
    }