From 15d371a890783cc98e9ff7f97e3d891bd2c12770 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Tue, 24 Sep 2024 15:01:17 +0530 Subject: [PATCH] catch exception in MQTTAdapterListener.messageArrived() --- .../plugins/input/adapter/mqtt/util/MQTTAdapterListener.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java index dffe9fc36..81a1e9b4d 100644 --- a/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -243,6 +243,8 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { } else { inputEventAdapterListener.onEvent(msgText); } + } catch (Exception ex) { + log.error("Error in message arrive : ", ex); } finally { PrivilegedCarbonContext.endTenantFlow(); }