Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge latest changes to r1 #49

Merged
merged 10 commits into from
Dec 4, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,16 @@ public void onMessage(Message message) {
Object obj = objectMapper.readerFor(typeRef).readValue(payload);

if (obj instanceof Map<?,?> dataMap) {
log.warn("BrokerUtil: Received a new message: topic: {}", ((ActiveMQTextMessage) message).getDestination().getPhysicalName());
log.warn("BrokerUtil: Received a new message: payload: {}", dataMap);
handlePayload(((ActiveMQTextMessage) message).getDestination().getPhysicalName(), dataMap);
String topic = ((ActiveMQTextMessage) message).getDestination().getPhysicalName();
// Print response messages except the EMS node status reports (_ui_instance_info, _client_metrics)
if (StringUtils.isNotBlank(topic)
&& ! topic.equals(properties.getDeviceStatusMonitorTopic())
&& ! topic.equals(properties.getDeviceMetricsMonitorTopic()))
{
log.warn("BrokerUtil: Received a new message: topic: {}", topic);
log.warn("BrokerUtil: Received a new message: payload: {}", dataMap);
}
handlePayload(topic, dataMap);
} else {
log.warn("BrokerUtil: Message payload is not recognized. Expected Map but got: type={}, object={}", obj.getClass().getName(), obj);
}
Expand Down