Commit 4625f93d9c32a0bf02f5982cf63ce389be72e8fd
Committed by
GitHub
1 parent
852ae61a
Revert "Added MQTT keep-alive parameter"
Showing
2 changed files
with
1 additions
and
6 deletions
@@ -469,7 +469,6 @@ transport: | @@ -469,7 +469,6 @@ transport: | ||
469 | boss_group_thread_count: "${NETTY_BOSS_GROUP_THREADS:1}" | 469 | boss_group_thread_count: "${NETTY_BOSS_GROUP_THREADS:1}" |
470 | worker_group_thread_count: "${NETTY_WORKER_GROUP_THREADS:12}" | 470 | worker_group_thread_count: "${NETTY_WORKER_GROUP_THREADS:12}" |
471 | max_payload_size: "${NETTY_MAX_PAYLOAD_SIZE:65536}" | 471 | max_payload_size: "${NETTY_MAX_PAYLOAD_SIZE:65536}" |
472 | - so_keep_alive: "${NETTY_SO_KEEPALIVE:true}" | ||
473 | # MQTT SSL configuration | 472 | # MQTT SSL configuration |
474 | ssl: | 473 | ssl: |
475 | # Enable/disable SSL support | 474 | # Enable/disable SSL support |
@@ -17,7 +17,6 @@ package org.thingsboard.server.transport.mqtt; | @@ -17,7 +17,6 @@ package org.thingsboard.server.transport.mqtt; | ||
17 | 17 | ||
18 | import io.netty.bootstrap.ServerBootstrap; | 18 | import io.netty.bootstrap.ServerBootstrap; |
19 | import io.netty.channel.Channel; | 19 | import io.netty.channel.Channel; |
20 | -import io.netty.channel.ChannelOption; | ||
21 | import io.netty.channel.EventLoopGroup; | 20 | import io.netty.channel.EventLoopGroup; |
22 | import io.netty.channel.nio.NioEventLoopGroup; | 21 | import io.netty.channel.nio.NioEventLoopGroup; |
23 | import io.netty.channel.socket.nio.NioServerSocketChannel; | 22 | import io.netty.channel.socket.nio.NioServerSocketChannel; |
@@ -51,8 +50,6 @@ public class MqttTransportService { | @@ -51,8 +50,6 @@ public class MqttTransportService { | ||
51 | private Integer bossGroupThreadCount; | 50 | private Integer bossGroupThreadCount; |
52 | @Value("${transport.mqtt.netty.worker_group_thread_count}") | 51 | @Value("${transport.mqtt.netty.worker_group_thread_count}") |
53 | private Integer workerGroupThreadCount; | 52 | private Integer workerGroupThreadCount; |
54 | - @Value("${transport.mqtt.netty.so_keep_alive}") | ||
55 | - private boolean keepAlive; | ||
56 | 53 | ||
57 | @Autowired | 54 | @Autowired |
58 | private MqttTransportContext context; | 55 | private MqttTransportContext context; |
@@ -72,8 +69,7 @@ public class MqttTransportService { | @@ -72,8 +69,7 @@ public class MqttTransportService { | ||
72 | ServerBootstrap b = new ServerBootstrap(); | 69 | ServerBootstrap b = new ServerBootstrap(); |
73 | b.group(bossGroup, workerGroup) | 70 | b.group(bossGroup, workerGroup) |
74 | .channel(NioServerSocketChannel.class) | 71 | .channel(NioServerSocketChannel.class) |
75 | - .childHandler(new MqttTransportServerInitializer(context)) | ||
76 | - .childOption(ChannelOption.SO_KEEPALIVE, keepAlive); | 72 | + .childHandler(new MqttTransportServerInitializer(context)); |
77 | 73 | ||
78 | serverChannel = b.bind(host, port).sync().channel(); | 74 | serverChannel = b.bind(host, port).sync().channel(); |
79 | log.info("Mqtt transport started!"); | 75 | log.info("Mqtt transport started!"); |