I’m pleased to announce that you can now try out the hotly anticipated MQTT v5 functionality with the Watson IoT Platform.

MQTT v5 specification

The cross-industry MQTT Technical Committee have been working on the MQTT v5 specification over the last few years, looking at how MQTT can be improved without sacrificing the key features that have made it so popular.

The team have recently voted to publish Committee Specification 02.¬† This is a big milestone and it’s unlikely that further technical changes will be made at this stage.

Members of the Oasis standards body will now vote on the specification to make it into a fully ratified standard.

MQTT v5 Beta

As a first stage of our beta for MQTT v5, you can now try out the features of MQTT v5 with the Watson IoT Platform in our deployment in Frankfurt, Germany.

Client code

To use the MQTT v5 features, you’ll need client code which supports MQTT v5.¬† The C open source eclipse client hosted at Paho has been updated for version 5, you can find and download it¬†here.

A quick guide on getting started quickly with MQTT v5 and Watson IoT Platform with the C client is here.

Backward compatibility

The Watson IoT Platform retains full backward compatibility for MQTT v3 and v3.1.1 clients.

MQTT v5 features

The major objectives of MQTTv5 are:

  • Enhancements for scalability
  • Improved error reporting
  • Formulate common patterns including capability discovery
  • Extensibility mechanisms including user properties
  • Performance improvements and support for small clients

Details

  • Error reporting
    • Better error reporting makes it easier for the client to understand why something didn’t work, such as a refused connection or failed publish.
  • Topic alias
    • Topic alias saves bytes on the wire.¬† It works by decreasing the size of MQTT data by encoding long topic names into a short integer encoding. ¬†In most clients this is seamless and fully hidden from the client application.
  • Message expiry
    • Allow a message to expire without being delivered based on an expiration time set in the message.¬† This is particularly useful if a message you are sending is only important to the device if it’s online.¬† For example when unlocking car doors, you could send a message and ensure that it only takes effect if it’s delivered within 5 minutes.
  • Message properties including user properties
    • Add message properties to the message header such as whether the content is text or binary, the content type, and application defined user properties. This metadata can be changed without modifying the message content.¬† This enables rapid routing in the backend application without needing to parse the payload of the message.¬† Another use for this is when the payload is encrypted and some information is included in the header outside the encrypted envelope to help with processing.
  • New session start and expiry support
    • Allows the client to control how long a session lasts by indicating whether to start a new session on connect, and how long after a disconnect to keep a session.
  • Subscription identifiers
    • Allow a subscription to be tagged with an identifier which is returned along with the messages received by the subscription. ¬†This allows for routing of messages internally in the client application.
  • Capability discovery
    • This allows the client to discover the capabilities of the MQTT server. ¬†Many of these capabilities are handled by the client library but are made available to the client application. ¬†For instance the server will send to the client the maximum packet size it will accept.

Link to the product documentation.

Join The Discussion

Your email address will not be published. Required fields are marked *