HiveMQ Plugins: MQTT Access Log Plugin

Written by The HiveMQ Team

Category: MQTT

Published: June 19, 2013


HiveMQ was released recently and the first two free HiveMQ plugins are also available for download. Besides many other remarkable features, HiveMQ excels with its outstanding extensibility. This enables you to deeply integrate HiveMQ in your existing M2M solution or any other software system. In this blog post series we want to show you some of the most popular HiveMQ extensions which you can use for free and which could be a perfect fit for your next M2M or Internet of Things project with MQTT. The first plugin we want to introduce is the MQTT Access Log Plugin.

MQTT Access Log Plugin

The MQTT Access Log Plugin was initially developed to monitor the actions of different clients in High Availability clusters. With the MQTT Access Log plugin you are able to log the following client actions:

  • A client connects to HiveMQ
  • A client publishes a message
  • A client subscribes to topics
  • A client unsubscribes from topics
  • A client disconnects from HiveMQ

The ability to monitor all client actions is incredibly useful for debugging, if you want to track the client actions of your clients to see what went wrong in a particular scenario. We use this plugin ourselves very often when verifying client distributions in HiveMQ clusters. The Access Log Plugin is extremely simple to use since it does not need any configuration. The following shows a example output of the Access Log:

1
2
3
4
5
6
7
8
2013-06-17 13:45:02  firstClient CONNECTED
2013-06-17 13:45:02  firstClient SUBSCRIBED TO [Topic{topic='#', qoS=AT_MOST_ONCE}]
2013-06-17 13:45:53  client2 CONNECTED
2013-06-17 13:45:53  client2 PUBLISHED MESSAGE TO test PAYLOAD: test
2013-06-17 13:45:53  client2 DISCONNECTED
2013-06-17 13:46:20  client3 CONNECTED
2013-06-17 13:46:20  client3 PUBLISHED MESSAGE TO topic/to/publish PAYLOAD: myMessage
2013-06-17 13:46:20  client3 DISCONNECTED

Although the plugin is extremely useful for development and debugging purposes, it should be used with care in production environments. The plugin logs every client interaction with the message broker, including publishes, to a log file. When you are dealing with massive amounts of distributed messages per second, the plugin will most likely be a bottleneck and will slow down the whole HiveMQ instance. For your smaller projects this may be no issue, though.

In the next weeks, additional free HiveMQ plugins will be available in the plugin section of our website. We will release a public Plugin SDK at the end of July so you can implement your own plugins very easily. An early access preview is available, just contact us for more information.

About The HiveMQ Team

We love writing about MQTT, IoT protocols and architecture in general. Our experts are here to help, so reach out to us if we can help!
Contact us
HiveMQ 1.3.1 released
Getting started with HiveMQ - Overview of MQTT client tools