背景
需要做项目迁移时,例如laravel迁移至hyperf时,因为基本上都是一步一步迁移的,仍有例如支付回调等依旧在laravel框架中进行消费的情况。...需要接管处理消息的queue进行数据格式改造,利用构造同样命名空间的job去进行投递,他会序列化数据,可以debug一下内容哦,然后投递至rabbitMQ后,laravel进行消费就好啦。...$job->timeout : null,
'data' => [
'commandName' => get_class($job...$job->timeout : null,
'data' => [
'commandName' => get_class($job...:class)->produce($message, $routingKey, $exchange, $confirm, $timeout);
}
}
PHP
Copy
使用方式 注意需要和laravel