$orderId, 'type' => $type ]); $message->setDelayMs($millisecond); $producer = ApplicationContext::getContainer()->get(Producer::class); $producer->produce($message); } /** * @param int $orderId * @param int $type * @param float|int $amount amount = 0 全部 amount > 0 部分 * @return void * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ protected function joinRefundQueue(int $orderId, int $type, float|int $amount = 0): void { $message = new RefundOrderProducer([ 'order_id' => $orderId, 'type' => $type, 'amount' => $amount, ]); $producer = ApplicationContext::getContainer()->get(Producer::class); $producer->produce($message); } }