diff --git a/manager/src/main/java/cc/iotkit/manager/controller/aligenie/AligenieDeviceController.java b/manager/src/main/java/cc/iotkit/manager/controller/aligenie/AligenieDeviceController.java index f6b9717b..08a311ad 100755 --- a/manager/src/main/java/cc/iotkit/manager/controller/aligenie/AligenieDeviceController.java +++ b/manager/src/main/java/cc/iotkit/manager/controller/aligenie/AligenieDeviceController.java @@ -1,5 +1,6 @@ package cc.iotkit.manager.controller.aligenie; +import cc.iotkit.common.Constants; import cc.iotkit.common.exception.BizException; import cc.iotkit.common.exception.OfflineException; import cc.iotkit.common.utils.JsonUtil; @@ -65,7 +66,7 @@ public class AligenieDeviceController { .serviceUrl(pulsarBrokerUrl) .build(); deviceMessageProducer = client.newProducer(JSONSchema.of(ThingModelMessage.class)) - .topic("persistent://iotkit/default/device_thing") + .topic("persistent://iotkit/default/" + Constants.THING_MODEL_MESSAGE_TOPIC) .create(); } diff --git a/protocol-gateway/component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java b/protocol-gateway/component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java index f73f252a..abfcb1b2 100755 --- a/protocol-gateway/component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java +++ b/protocol-gateway/component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java @@ -51,7 +51,7 @@ public class DeviceBehaviourService { .serviceUrl(serverConfig.getPulsarBrokerUrl()) .build(); deviceMessageProducer = client.newProducer(JSONSchema.of(ThingModelMessage.class)) - .topic("persistent://iotkit/default/device_thing") + .topic("persistent://iotkit/default/" + Constants.THING_MODEL_MESSAGE_TOPIC) .create(); }