MQTT-XES
MQTT-XES is a lightweight library for real-time logging over MQTT, for process mining purposes. The MQTT-XES library is described in the corresponding paper:
- MQTT-XES: Real-time Telemetry for Process Event Data
A. Burattin, M. Eigenmann, R. Seiger, B. Weber
In Online Proceedings of the BPM Demo Track 2020; Sevilla, Spain; September, 13-18 2020; CEUR-WS.org 2020.
Installing the library
To use the library in your Maven project it is necessary to include, in the pom.xml
file, the package repository:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.beamline</groupId>
<artifactId>mqtt-xes</artifactId>
<version>0.3.5</version>
</dependency>
Sending events
To generate events to be sent using MQTT-XES it is possible to use the following code snippet, first to create the client:
It is also necessary to create the event that has to be sent:XesMqttEvent event = new XesMqttEvent("source-id", "case-id", "activity")
.addTraceAttribute("name", "value")
.addEventAttribute("name", "value");
Consuming events
To consume events, it is first necessary to create a consumer client, using the following code snippet:
Once the client is set, it is possible to subscribe to the MQTT-XES events being sent and a callback class need to be provided. Please note that theaccept
method of XesMqttEventCallback
receives a XesMqttEvent: