mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
bug fix is extracting payload
This commit is contained in:
parent
60eec59502
commit
01967c6a1b
@ -199,7 +199,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
|
|||||||
public void messageArrived(String topic, MqttMessage mqttMessage) throws Exception {
|
public void messageArrived(String topic, MqttMessage mqttMessage) throws Exception {
|
||||||
try {
|
try {
|
||||||
String mqttMsgString = mqttMessage.toString();
|
String mqttMsgString = mqttMessage.toString();
|
||||||
String msgText = mqttMsgString.substring(mqttMsgString.indexOf("{"), mqttMsgString.indexOf("}") +1);
|
String msgText = mqttMsgString.substring(mqttMsgString.indexOf("{"), mqttMsgString.lastIndexOf("}") + 1);
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug(msgText);
|
log.debug(msgText);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user