Client Event History

HiveMQ 4.4 introduces this the Client Event History features. When enabled this feature stores each of the following events for every MQTT client connected to your HiveMQ cluster.

  • Client connect

  • Client disconnect

  • Overload protection activated

  • Overload protection deactivated

The events of each client can be viewed in the Client Detail View of the HiveMQ Control Center.

Configuration

The client event history is disabled by default. The following configuration option for the client event history exist.

Table 1. Configuration for Client Event History
Configuration Default Limits Description

enabled

false

-

'true' enables the client event history.

lifetime

604800

1-864000

Timespan in seconds that events are save for each client on the broker.

Enable the Client Event History
<?xml version="1.0"?>
<hivemq>
    ...
	<client-event-history>
		<enabled>true</enabled>
		<lifetime>604800</lifetime> <!-- 7 days -->
	</client-event-history>
    ...
</hivemq>
Enabling the client event history leads to increased disc space requirements for your deployment. Please reach out to the HiveMQ Support before enabling this feature in production.

Monitoring

The following metrics offers an insight into the currently stored client events.

Table 2. Client Event History Metrics
Metric Type Description

com.hivemq.client-events.stored.total

Counter

The total number of client events stored including all replicas.

com.hivemq.persistence.executor.client-events.tasks

Gauge

Current amount of disk I/O tasks that are enqueued by the client events persistence

com.hivemq.persistence.executor.client-events.time

Timer

Measures the mean execution time (in nanoseconds) of client events tasks