Skip to content


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:

Installing the library

To use the library in your Maven project it is necessary to include, in the pom.xml file, the package repository:

Then you can include the dependency to the version you are interested, for example:
See for further details (e.g., using it with Gradle).

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:

XesMqttProducer client = new XesMqttProducer("", "BASE");
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");
Finally, it is possible to send the event using the client object previously defined:

Consuming events

To consume events, it is first necessary to create a consumer client, using the following code snippet:

XesMqttConsumer client = new XesMqttConsumer("", "BASE");
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 the accept method of XesMqttEventCallback receives a XesMqttEvent:
client.subscribe(new XesMqttEventCallback() {
    public void accept(XesMqttEvent e) {
        System.out.println(e.getProcessName() + " - " + e.getCaseId() + " - " + e.getActivityName());