|
|
|
@ -61,7 +61,7 @@ public class NettyServer { |
|
|
|
private DownXml2Json downXml2Json = new DownXml2Json(aliasHost); |
|
|
|
private UpJson2Xml upJson2Xml = new UpJson2Xml(aliasHost); |
|
|
|
private NettyServerHandler nettyServerHandler; |
|
|
|
private ExecutorService executorService = new ThreadPoolExecutor(20, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(400)); |
|
|
|
// private ExecutorService executorService = new ThreadPoolExecutor(20, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(400)); |
|
|
|
|
|
|
|
@Resource |
|
|
|
DeviceServerProperties deviceServerProperties; |
|
|
|
@ -198,13 +198,13 @@ public class NettyServer { |
|
|
|
|
|
|
|
//开启线程处理消息 |
|
|
|
public void receiveMsg(BinaryModel binaryModel, ChannelHandlerContext context) { |
|
|
|
executorService.execute(() -> { |
|
|
|
// executorService.execute(() -> { |
|
|
|
try { |
|
|
|
dealMsgInThreadPool(binaryModel, context); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(ExceptionUtils.getStackTrace(e)); |
|
|
|
logger.error("error", e); |
|
|
|
} |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} |
|
|
|
|
|
|
|
//重新发送 |
|
|
|
|