From release 4.0.14 MQTT Engine supports the new STATE message format and is in compliance with MQTT Sparkplug™ B specification v3.0.0.

Recognizing that there many existing clients which are only compatible with the MQTT Sparkplug™ B specification v2.2, MQTT Engine now supports an MQTT client whose only function is to publish the STATE message in its legacy format.


If this is a new installation of the MQTT Engine module, the legacy STATE client will be disabled as default and must be enabled manually.

If you are updating from a previous version of MQTT Engine to v4.0.14 or greater, the configuration of the Legacy State template will be automatically populated with the variables from the server configuration Main and TLS sections.

For some MQTT servers, the Username/Password for each client connection must be unique and so these parameters for the second legacy client will need to be edited.

However, there are some instances where the migration from older MQTT Engine modules does not complete this process and it must be completed manually.

How do I configure the legacy state message?

The additional legacy STATE client is configured under the Advanced section for each of the configured MQTT servers in the MQTT Engine module configuration

To disable, you simply deselect the Enable Legacy STATE messages option. To fully remove the retained legacy STATE message at the server, you will need to restart any connected server.

Which clients will be created?

With Primary Host Disabled and Legacy Host Disabled

  • ME client created, connects and subscribes [[a/#][0], [spBv1.0/#][0]]

With Primary Host Enabled and Legacy Host Disabled

  • ME client created, connects and subscribes [[a/#][0], [spBv1.0/#][0], [spBv1.0/STATE/MyPrimaryHost][1]]

With Primary Host Disabled and Legacy Host Enabled

  • ME client created, connects and subscribes [[a/#][0], [spBv1.0/#][0]]
  • ME-LS client created but no connection made

With Primary Host Enabled and Legacy Host Enabled

  • ME client created, connects and subscribes [[a/#][0], [spBv1.0/#][0], [spBv1.0/STATE/MyPrimaryHost][1]]
  • ME-LS client created, connects and subscribes [[STATE/MyPrimaryHost][1]]


MQTT Engine will always attempt to publish/subscribe using the new STATE message format even when the Legacy Client is enabled and there is no means to disable this.

If you have restrictive Access Controls Lists configured at your broker you will need to allow access to the spBv1.0/STATE/ topic



  • No labels