Commit 400603f1 by 杨树贤

修改队列

parent a28cdd31
......@@ -124,6 +124,12 @@ RABBITMQ2_LOGIN=guest
RABBITMQ2_PASSWORD=guest
RABBITMQ2_QUEUE=wms_service
RABBITMQ_SKU_HOST=192.168.1.252
RABBITMQ_SKU_PORT=5672
RABBITMQ_SKU_USER=guest
RABBITMQ_SKU_PASSWORD=guest
RABBITMQ_SKU_VHOST=/
#RABBITMQ_HOST=192.168.1.237
#RABBITMQ_PORT=5672
#RABBITMQ_VHOST=/
......
......@@ -503,10 +503,10 @@ class SkuService extends BaseService
if (!is_array($skuIds)) {
$skuIds = explode(',', trim($skuIds));
}
$conn = new AMQPStreamConnection(config('database.connections.rabbitmq2.host'),
config('database.connections.rabbitmq2.port'),
config('database.connections.rabbitmq2.login'),
config('database.connections.rabbitmq2.password'));
$conn = new AMQPStreamConnection(config('database.connections.rabbitmqSku.host'),
config('database.connections.rabbitmqSku.port'),
config('database.connections.rabbitmqSku.login'),
config('database.connections.rabbitmqSku.password'));
foreach ($skuIds as $skuId) {
$channel = $conn->channel();
$channel->queue_declare('lie_footstone_update_sku_info_queue', false, true, false, false);
......
......@@ -388,6 +388,16 @@ return [
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
],
'rabbitmqSku' => [
'driver' => 'rabbitmq',
'host' => env('RABBITMQ_SKU_HOST', '127.0.0.1'),
'port' => env('RABBITMQ_SKU_PORT', 5672),
'vhost' => env('RABBITMQ_SKU_VHOST', '/'),
'login' => env('RABBITMQ_SKU_LOGIN', 'guest'),
'password' => env('RABBITMQ_SKU_PASSWORD', 'guest'),
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
],
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment