composer
This commit is contained in:
@@ -13,7 +13,7 @@ use support\Log;
|
||||
$user = config('cons.mq.user');
|
||||
$password = config('cons.mq.password');
|
||||
$queue = config('cons.mq.queue_t') . '-order.print.queue';
|
||||
|
||||
define('AMQP_DEBUG', true);
|
||||
// 防止空闲时间断线必须设置心跳
|
||||
$connection = new AMQPStreamConnection($host, $port, $user, $password,
|
||||
'/',
|
||||
@@ -99,6 +99,7 @@ use support\Log;
|
||||
};
|
||||
$rabbit_channel->basic_consume($queue, '', false, false, false, false, $callback);
|
||||
while ($rabbit_channel->is_consuming()) {
|
||||
Log::info('order.print.queue-MQ准备调用wait');
|
||||
$rabbit_channel->wait();
|
||||
}
|
||||
$rabbit_channel->close();
|
||||
|
||||
Reference in New Issue
Block a user