@@ -0,0 +1,1554 @@
+package org.eclipse.viatra.cep.mqtt.commons.utils;%0D%0A%0D%0Aimport java.text.SimpleDateFormat;%0D%0Aimport java.util.Date;%0D%0A%0D%0Aimport org.apache.log4j.Logger;%0D%0Aimport org.eclipse.viatra.cep.mqtt.commons.mqtt.Publisher;%0D%0Aimport org.eclipse.viatra.cep.mqtt.commons.utils.LoggerUtil;%0D%0A%0D%0Aimport com.eclipsesource.json.JsonObject;%0D%0A%0D%0Apublic class DashboardUtil %7B%0D%0A%0D%0A%09private final static SimpleDateFormat sdf = new SimpleDateFormat(%22HH:mm:ss.SSS%22);%0D%0A%09private static final Logger log4jLogger = Logger.getLogger(DashboardUtil.class);%0D%0A%09private static final LoggerUtil LOGGER = new LoggerUtil(log4jLogger);%0D%0A%0D%0A%09public static String brokerAddress = %22%22;%0D%0A%09%0D%0A%09private static Publisher publisher = new Publisher(brokerAddress, %22IOT_CEP_DASHBOARD%22);;%0D%0A%09%0D%0A%09public static void publishSimpleEvent(String eventMessage) %7B%0D%0A%09%09publish(eventMessage, %22SIMPLE%22);%0D%0A%09%7D%0D%0A%09%0D%0A%09public static void publishHighlightedEvent(String eventMessage) %7B%0D%0A%09%09publish(eventMessage, %22HIGHLIGHTED%22);%0D%0A%09%7D%0D%0A%09%0D%0A%09private static void publish(String eventMessage, String marker) %7B%0D%0A%09%09try %7B%0D%0A%09%09%09if (!publisher.isConnected()) %7B%0D%0A%09%09%09%09publisher.connect();%0D%0A%09%09%09%7D%0D%0A%09%09%09JsonObject eventMsg = new JsonObject();%0D%0A%09%09%09JsonObject event = new JsonObject();%0D%0A%09%09%09event.add(%22event_msg%22, eventMessage);%0D%0A%09%09%09event.add(%22event_type%22, marker);%0D%0A%09%09%09event.add(%22timestamp%22, sdf.format(new Date()));%0D%0A%09%09%09eventMsg.add(%22CEP_EVENT_MESSAGE%22, event);%0D%0A%09%09%09publisher.publish(%22dashboard/cep%22, eventMsg.toString().getBytes());%0D%0A%09%09%09%0D%0A%09%09%7D catch (Exception ex) %7B%0D%0A%09%09%09LOGGER.error(%22Unable publish message to dashboard: %22 + ex.getMessage());%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%7D

Add dashboard util to commons project