diff --git a/src/AP_WS_Connection.cpp b/src/AP_WS_Connection.cpp index 278612ac..9d2edc70 100644 --- a/src/AP_WS_Connection.cpp +++ b/src/AP_WS_Connection.cpp @@ -501,7 +501,6 @@ namespace OpenWifi { } break; case uCentralProtocol::Events::ET_EVENT: { - ParamsObj->stringify(std::cout); Process_event(ParamsObj); } break; diff --git a/src/AP_WS_Process_event.cpp b/src/AP_WS_Process_event.cpp index 5ccd0f8d..9233e39c 100644 --- a/src/AP_WS_Process_event.cpp +++ b/src/AP_WS_Process_event.cpp @@ -34,8 +34,14 @@ namespace OpenWifi { FullEvent.set("type", EventType); FullEvent.set("timestamp", EventTimeStamp); FullEvent.set("payload", EventPayload); - KafkaManager()->PostMessage(KafkaTopics::DEVICE_EVENT_QUEUE, SerialNumber_, - FullEvent); + if(strncmp(EventType.c_str(),"rrm.",4) == 0 ) { + std::cout << "Publishing " << EventType << " to RRM" << std::endl; + KafkaManager()->PostMessage(KafkaTopics::RRM, SerialNumber_, + FullEvent); + } else { + KafkaManager()->PostMessage(KafkaTopics::DEVICE_EVENT_QUEUE, SerialNumber_, + FullEvent); + } } } } catch (const Poco::Exception &E) { diff --git a/src/framework/KafkaTopics.h b/src/framework/KafkaTopics.h index e5f9cea6..409cb7ab 100644 --- a/src/framework/KafkaTopics.h +++ b/src/framework/KafkaTopics.h @@ -20,6 +20,7 @@ namespace OpenWifi::KafkaTopics { inline const char * DEVICE_EVENT_QUEUE = "device_event_queue"; inline const char * DEVICE_TELEMETRY = "device_telemetry"; inline const char * PROVISIONING_CHANGE = "provisioning_change"; + inline const char * RRM = "rrm"; namespace ServiceEvents { inline const char * EVENT_JOIN = "join";