$orderId, 'type' => $type ]); $message->setDelayMs($millisecond); // $producer = ApplicationContext::getContainer()->get(Producer::class); $this->producer->produce($message); } /** * @param int $orderId * @param int $type refundCode * @param string $reason * @param int $adminId * @return void */ protected function joinRefundQueue(int $orderId, int $type, string $reason = '系统自动',int $adminId = 0): void { $message = new RefundOrderProducer([ 'order_id' => $orderId, 'type' => $type, 'reason' => $reason, 'admin_id' => $adminId ]); // $producer = ApplicationContext::getContainer()->get(Producer::class); $this->producer->produce($message); } }