瀏覽代碼

开放端口信息

master
林万龙 3 年之前
父節點
當前提交
b8ef27fef2
共有 1 個檔案被更改,包括 8 行新增1 行删除
  1. +8
    -1
      src/main/java/com/telpo/iotgateway/server/IotSubscribe.java

+ 8
- 1
src/main/java/com/telpo/iotgateway/server/IotSubscribe.java 查看文件

@@ -42,6 +42,9 @@ public class IotSubscribe {
private long timeStamp;
//签名方法:支持hmacmd5、hmacsha1和hmacsha256。
private String signMethod;
private String uId;
private String regionId;
private String productKey;
private String clientId;
private String iotHost;
private String iotPort;
@@ -65,6 +68,9 @@ public class IotSubscribe {
this.iotInstanceId = environment.getProperty("iot.iotInstanceId");
//签名方法:支持hmacmd5、hmacsha1和hmacsha256。
this.signMethod = environment.getProperty("iot.signMethod");
this.uId = environment.getProperty("iot.uId");
this.regionId = environment.getProperty("iot.regionId");
this.productKey = environment.getProperty("iot.productKey");
this.clientId = environment.getProperty("iot.clientId");
this.iotHost = environment.getProperty("iot.iotHost");
this.iotPort = environment.getProperty("iot.iotPort");
@@ -84,7 +90,8 @@ public class IotSubscribe {
String password = doSign(signContent,accessSecret, signMethod);

//接入域名,请参见AMQP客户端接入说明文档。
String connectionUrl = "failover:(amqps://" + iotHost + ":" + iotPort
String host = uId + ".iot-amqp." + regionId + ".aliyuncs.com";
String connectionUrl = "failover:(amqps://" + host + ":" + iotPort
+ "?amqp.idleTimeout=80000)"
+ "?failover.reconnectDelay=30";



Loading…
取消
儲存