@ -162,7 +162,7 @@ public class DataPublisherService extends Service {
if (!mqttTransportHandler.isConnected()) {
mqttTransportHandler.connect();
}
String topic = "wso2/" + LocalRegistry.getTenantDomain(context) + "/" + SenseConstants
String topic = LocalRegistry.getTenantDomain(context) + "/" + SenseConstants
.DEVICE_TYPE + "/" + deviceId + "/data";
mqttTransportHandler.publishDeviceData(user, deviceId, jsonArray.toString(), topic);
@ -77,7 +77,7 @@ public abstract class MQTTTransportHandler implements MqttCallback, TransportHan
String username = LocalRegistry.getUsername(context);
String deviceId = LocalRegistry.getDeviceId(context);
this.clientId = deviceId + ":" + SenseConstants.DEVICE_TYPE;
this.subscribeTopic = "wso2/" + LocalRegistry.getTenantDomain(context)+ "/" + SenseConstants.DEVICE_TYPE + "/" +
this.subscribeTopic = LocalRegistry.getTenantDomain(context)+ "/" + SenseConstants.DEVICE_TYPE + "/" +
deviceId + "/command/#";
this.clientWillTopic = DISCONNECTION_WILL_TOPIC_PREFIX + SenseConstants.DEVICE_TYPE;
this.mqttBrokerEndPoint = LocalRegistry.getMqttEndpoint(context);
@ -73,7 +73,7 @@ public class ZipUtil {
xmppEndpoint = xmppEndpoint + ":" + XmppConfig.getInstance().getSERVER_CONNECTION_PORT();
Map<String, String> contextParams = new HashMap<>();
contextParams.put("SERVER_NAME", "wso2/" + APIUtil.getTenantDomainOftheUser());
contextParams.put("SERVER_NAME", APIUtil.getTenantDomainOftheUser());
contextParams.put("DEVICE_OWNER", owner);
contextParams.put("DEVICE_ID", deviceId);
contextParams.put("DEVICE_NAME", deviceName);
@ -20,8 +20,8 @@ owner=${DEVICE_OWNER}
deviceId=${DEVICE_ID}
device-name=${DEVICE_NAME}
controller-context=/raspberrypi/controller
mqtt-sub-topic=wso2/{owner}/raspberrypi/{deviceId}
mqtt-pub-topic=wso2/{owner}/raspberrypi/{deviceId}/publisher
mqtt-sub-topic=${SERVER_NAME}/{owner}/raspberrypi/{deviceId}
mqtt-pub-topic=${SERVER_NAME}/{owner}/raspberrypi/{deviceId}/publisher
https-ep=${HTTPS_EP}
http-ep=${HTTP_EP}
apim-ep=${APIM_EP}