MQTT Interface

Publish & subscribe based client interface.

Implementation

The MQTT interface implements the standardized MQTT v3.1.1 protocol with some exceptions:

Feature Status Notes
Persistence Subscriptions are currently not persistent. Clients have to resubscribe to all topics.
Clean Session Sessions are only temporary and not persistent. Setting the flag will have no effect.

Ports

The following ports are available on the broker.shiftr.io host:

MQTT MQTTS MQTTWS MQTTWSS
1883 8883 80 443

Protocol Notes

  • The username and password settings are used to transmit the token key and secret.
  • The clientId is also used as the connection name.
  • The wildcard * is automatically replaced with +.
  • There is no difference between the topic /hello and hello. However, the client will always receive a root slash in the message topic if the responsible subscription does so too.

Limits

  • The client id length is limited to 64 characters.
  • The topic length is limited to 128 characters.
  • The payload size of publish messages is limited to 64KB.
  • The active subscriptions per connection are limited to 100.
  • The static maximum packet rate limit per connection is 100/s.

Message Ordering

Messages published by a MQTT client are guaranteed to be delivered in the order as they are published. However, if multiple clients publish messages to multiple topics the overall order of messages is not defined, but the observed order is guaranteed to be consistent among all connections. In other words, the stream of messages per namespace is guaranteed to be always in the same order.

Client Libraries

A list of recommended open-source client libraries: