修改共享组名称动态生成
This commit is contained in:
parent
eb76ef35e0
commit
26e6b95d6b
|
|
@ -29,6 +29,7 @@ import org.springframework.util.CollectionUtils;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -73,7 +74,7 @@ public class DjiService {
|
|||
.autoReconnect(mqttProperties.getAutoReconnect())
|
||||
.cleanSession(mqttProperties.getCleanSession())
|
||||
.useSharedSubscription(true)
|
||||
.sharedGroupName("dji-server-group")
|
||||
.sharedGroupName("dji-server-group" + UUID.randomUUID().toString())
|
||||
.build();
|
||||
|
||||
// 创建客户端
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -97,7 +98,7 @@ public class TuohengService {
|
|||
.autoReconnect(mqttProperties.getAutoReconnect())
|
||||
.cleanSession(mqttProperties.getCleanSession())
|
||||
.useSharedSubscription(true)
|
||||
.sharedGroupName("tuoheng-server-group")
|
||||
.sharedGroupName("tuoheng-server-group" + UUID.randomUUID().toString())
|
||||
.build();
|
||||
|
||||
clientManager.initClient(config);
|
||||
|
|
|
|||
Loading…
Reference in New Issue