#665 : Added some changes to reuse PropertyUtils.replaceTenantDomainProperty()

revert-dabc3590
Rasika Perera 8 years ago
parent be99ca571b
commit f7dbc156b3

@ -57,10 +57,6 @@ public class MQTTEventAdapter implements InputEventAdapter {
,globalProperties);
String topic = eventAdapterConfiguration.getProperties().get(MQTTEventAdapterConstants.ADAPTER_MESSAGE_TOPIC);
String tenantDomain = topic.split("/")[0];
if (tenantDomain.equals("${tenant-domain}")) {
tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
topic = topic.replaceAll("\\$\\{tenant-domain\\}", tenantDomain);
}
mqttAdapterListener = new MQTTAdapterListener(mqttBrokerConnectionConfiguration
,topic
,eventAdapterConfiguration

@ -88,7 +88,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
int keepAlive = mqttBrokerConnectionConfiguration.getKeepAlive();
this.topic = PropertyUtils.replaceTenantDomainProperty(topic);
this.eventAdapterListener = inputEventAdapterListener;
this.tenantDomain = tenantDomain;
this.tenantDomain = PropertyUtils.replaceTenantDomainProperty(tenantDomain);
//SORTING messages until the server fetches them
String temp_directory = System.getProperty("java.io.tmpdir");

Loading…
Cancel
Save