From 335916f1f15eb9d0b34dea38cacee2300eac0606 Mon Sep 17 00:00:00 2001
From: 李防 <liguofang0703@126.com>
Date: 星期一, 07 三月 2022 14:20:27 +0800
Subject: [PATCH] InviteRequestProcessor类中,channelid从invite消息的header subject获取,不再从第一行request line获取。原因是和第三方平台对接时,发送的invite消息第一行为国标平台编码而不是设备通道编码,导致报错通道不存在,返回404。

---
 src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java
index f2edf04..1bc8521 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/ThreadPoolTaskConfig.java
@@ -8,8 +8,10 @@
 import java.util.concurrent.ThreadPoolExecutor;
 
 @Configuration
-@EnableAsync
+@EnableAsync(proxyTargetClass = true)
 public class ThreadPoolTaskConfig {
+
+    public static final int cpuNum = Runtime.getRuntime().availableProcessors();
 
     /**
      *   榛樿鎯呭喌涓嬶紝鍦ㄥ垱寤轰簡绾跨▼姹犲悗锛岀嚎绋嬫睜涓殑绾跨▼鏁颁负0锛屽綋鏈変换鍔℃潵涔嬪悗锛屽氨浼氬垱寤轰竴涓嚎绋嬪幓鎵ц浠诲姟锛�
@@ -20,11 +22,11 @@
     /**
      * 鏍稿績绾跨▼鏁帮紙榛樿绾跨▼鏁帮級
      */
-    private static final int corePoolSize = 5;
+    private static final int corePoolSize = cpuNum;
     /**
      * 鏈�澶х嚎绋嬫暟
      */
-    private static final int maxPoolSize = 30;
+    private static final int maxPoolSize = cpuNum*2;
     /**
      * 鍏佽绾跨▼绌洪棽鏃堕棿锛堝崟浣嶏細榛樿涓虹锛�
      */
@@ -32,11 +34,11 @@
     /**
      * 缂撳啿闃熷垪澶у皬
      */
-    private static final int queueCapacity = 10000;
+    private static final int queueCapacity = 500;
     /**
      * 绾跨▼姹犲悕鍓嶇紑
      */
-    private static final String threadNamePrefix = "hdl-uhi-service-";
+    private static final String threadNamePrefix = "wvp-";
 
     @Bean("taskExecutor") // bean鐨勫悕绉帮紝榛樿涓洪瀛楁瘝灏忓啓鐨勬柟娉曞悕
     public ThreadPoolTaskExecutor taskExecutor() {

--
Gitblit v1.8.0