Skip to main content

Anedya MQTT Endpoints

Anedya provides MQTT Endpoints to which you can connect your devices to submit data in realtime and get realtime messages from the platform.

Endpoints

The devices can connect to following endpoint:

mqtt.<region-code>.anedya.io

The devices can connect through:

PortConnecton Method
8883TCP Connection
8804Websocket Connection

You can get region codes from here

Version

Anedya supports MQTT v3.1.1 and v5.0 with certain features not available.

Topics

Devices can publish and subscribe to a reserved set of topics. For now devices are not allowed to publish to arbitary topics. All topics starting from $anedya are reserved for Anedya platform.

Following two topics can be subscribed by devices to get response or errors from the platform.

$anedya/device/{deviceID}/errors
$anedya/device/{deviceID}/response

Devices can perform the actions by publishing to relevant topics given in Device APIs section. In addition to standard request body, all endpoint support an additional field reqID which is included in response to that request. This ID can be used to corelate request and response when using MQTT. If no reqID is specified, platform will generate one randomly. The maximum size of reqID is 36 characters. Any extra length will be truncated to first 36 characters and message will be dropped if total length exceeds 100 characters

Credentials

Devices can get connected using following Credentials:

Client ID Device UUID string
UserDevice UUID string
PasswordConnection key of the node

TLS

Anedya platform supports TLS 1.2 and TLS 1.3. We recommend using TLS 1.3 for improved security. Anedya Platform uses Self-Signed certificates, hence it is required to add Anedya Root Certificates to the trusted certificates of you device. You can download certificates from:

  • Anedya Root CA 1 (RSA - 2048) (PEM, DER)
  • Anedya Root CA 2 (RSA - 4096) (Reserved) (PEM, DER)
  • Anedya Root CA 3 (ECC - 256) (PEM, DER)
  • Anedya Root CA 4 (ECC - 384) (Reserved) (PEM, DER)
🎖️Certificate Priorities

Anedya supports both RSA and ECC certificates. During TLS handshake appropriate certificate is used according to cipher suites specified in client hello information. If supported cipher suites contains both ECC and RSA support, ECC is given priority over RSA. If your device supports only ECC or only RSA, you are required to configure supported cipher suites in your TLS stack configuration, or attempt to connect will result in TLS handshake error.

Limits

There are quotas and limits on account level as well as on device level which you need to consider:

ActionsDescriptionLimitAccount/Device
Max connection rateThe rate at which connections can be made by devices. It adjusts dynamically according to the number of nodes registered in your account100 Connections/secondAccount Level
Max connection rate per client IDThe rate at which a device can create connections. Connections made at higher rate will be rejected1 Connection/SecondDevice level
Max unauthorized connection retriesMaximum unauthorized connection retries a device can make before temporarily banned for period of 1 minute5 retries/minuteDevice level
Max messages per secondMaximum rate at which a device can publish messages. Any messages above this rate will be dropped.100 Messages/secondDevice level
Max unauthorized eventsEach unauthorized connection attempt, device binding attempt, variable data submission attempt will be considered as 1 event , crossing the rate can result in dropping on further messages on random basis50 Events/second (Adjusted for total number of nodes registered) max 500 Events/SecondAccount level
Max message payload sizeMaximum size of MQTT payload128 kBN/A