config = ['port' => $port, 'mode' => $mode, 'timeout' => $timeout]; } /** * @param array $handler * @return mixed * @throws ReflectionException * @throws ComponentException * @throws NotFindClassException * @throws Exception */ public function execute(array $handler): mixed { $rpc = Snowflake::app()->getRpc(); $rpc->addProducer($this->cmd, $handler, $this->config); if ($handler[0] instanceof IProducer) { $handler[0]->initClient(); } return parent::execute($handler); } }