Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
atsag committed Nov 22, 2024
2 parents 1241387 + d8f0e08 commit 2a3bef2
Showing 1 changed file with 10 additions and 3 deletions.
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

0 comments on commit 2a3bef2

Please sign in to comment.