From 92f14f517a125d188175b081c69676f1f11fd6d3 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Wed, 13 Sep 2023 08:33:40 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-7831 Signed-off-by: stephb9959 --- src/AP_WS_Process_alarm.cpp | 6 +----- src/GWKafkaEvents.cpp | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/AP_WS_Process_alarm.cpp b/src/AP_WS_Process_alarm.cpp index 2609bd9d3..a4eee6198 100644 --- a/src/AP_WS_Process_alarm.cpp +++ b/src/AP_WS_Process_alarm.cpp @@ -21,11 +21,7 @@ namespace OpenWifi { if (ParamsObj->has(uCentralProtocol::SERIAL) && ParamsObj->has(uCentralProtocol::DATA)) { if (KafkaManager()->Enabled()) { - auto Data = ParamsObj->get(uCentralProtocol::DATA); - Poco::JSON::Stringifier Stringify; - std::ostringstream OS; - Stringify.condense(ParamsObj, OS); - KafkaManager()->PostMessage(KafkaTopics::ALERTS, SerialNumber_, OS.str()); + KafkaManager()->PostMessage(KafkaTopics::ALERTS, SerialNumber_, *ParamsObj); } } } diff --git a/src/GWKafkaEvents.cpp b/src/GWKafkaEvents.cpp index 71160c17d..53062e92a 100644 --- a/src/GWKafkaEvents.cpp +++ b/src/GWKafkaEvents.cpp @@ -12,9 +12,7 @@ namespace OpenWifi { Event.set("type", type_); Event.set("timestamp", timestamp_); Event.set("payload", payload_); - std::ostringstream OS; - Event.stringify(OS); - KafkaManager()->PostMessage(KafkaTopics::DEVICE_EVENT_QUEUE, Utils::IntToSerialNumber(serialNumber_), OS.str()); + KafkaManager()->PostMessage(KafkaTopics::DEVICE_EVENT_QUEUE, Utils::IntToSerialNumber(serialNumber_), Event); } }