Skip to content

Development Related Questions

Which protocol connections are supported?

EMQX Cloud deployment supports MQTT over TLS/SSL and WebSockets over TLS/SSL protocol connections.

If you need other protocol support, you can submit a ticket or send an email (cloud-support@emqx.io) to us.

How to bind a domain name?

When you create a Professional deployment, you will be given an MQTT connection address, which is displayed as a domain in the deployment.You may already have your own domain and would like to be able to link to it.

Steps

  1. Let's assume you have the top-level domain abc.com and want to access the MQTT service as mqtt.abc.com, and your deployment on EMQX Cloud has a connection address of xxx.emqx.cloud.

  2. Point the CNAME record from mqtt.abc.com to xxx.emqx.cloud in your domain settings panel.

  3. Once the DNS resolution has taken effect, you can connect to the MQTT service via mqtt.abc.com.

TIP

Serverless and Dedicated - Basic deployments do not support using CNAME to bind custom domains. It is recommended to use the default domain connection address provided by EMQX Cloud to ensure correct allocation and management of connections.

How to set up NAT gateway configuration?

NAT is only supported for Professional plan. You can enable NAT gateway in Valued-Added Service.

Will cluster scaling affect device connectivity?

It will cause an interruption to the connectivity for a few seconds.

How do I connect my own services to the MQTT service via local network when I have built a VPC peer-to-peer connection?

If you need an internal network connection to the professional deployment, you can purchase Internal Load Balancers to achieve that. It'a add-on service provided by us.

Is API supported?

Yes. An HTTP API is provided for integration with external systems, such as querying client information, posting messages, and creating rules.

Find more here REST API

What kind of TLS/SSL authentication is supported?

Support one-way, two-way, and custom signature for configuration.

How to integrate with other systems?

You can use data integrations to integrate with other applications. Check Data Integrations for more details.

The authentication data of the device is stored in my own database. Can I do the authentication of MQTT connections through my own database?

EMQX Cloud Dedicated supports authentication from the user's own database, see the document External Authentication and Access Control.

How long can device logs be kept in the console?

EMQX Cloud does not keep device communication logs, only deployment event logs, which are kept for 7 days by default.

How long can device events be stored?

Device event data can be permanently integrated into third-party storage through event topics.

Is it possible to use offline messages?

In general, MQTT clients will not receive messages if they are offline only when they are connected to the message server. However, if the client has a fixed ClientID, clean_session is false, and the QoS settings meet the server's configuration requirements, the server can keep a certain amount of offline messages for the client when the client is offline and send them to the client when the client connects again.

Offline messages are useful when the network connection is not very stable, or when there are certain requirements on QoS.

How long are offline messages held?

The default is 2 hours for MQTT v3 protocols, and for MQTT v5 protocols it is set according to the value of session_expiry_interval in the client. After the expiration time, the messages in the queue will be lost.

How to do offline message staging?

Given the instability of message staging, we recommend storing offline messages. We recommend storing offline messages on a disk. Here we need to use the professional version of the Data Integration Service, which can save offline messages to a database like Redis. After the device comes online and consumes the message, the corresponding offline message will also be deleted.

How to calculate sessions?

The definition for session: The number of sessions is calculated by adding the number of connected clients and the disconnected clients with sessions retained in the broker. Connected clients are those that connect to the broker after CONNECT, including those that are not disconnected within the keepAlive span. Disconnected clients that keep a session are clients that are offline but have CleanSession set to false, and such clients are counted in the session count. When a device DISCONNECT goes offline, or if it has not communicated for more than the keepAlive span, the device will go offline and will not be counted in the number of sessions.

What is Message TPS?

Message TPS (Transactions Per Second) is a metric used to measure the number of messages processed per second in an EMQX deployment. Message TPS includes the total rate of messages flowing in and out of EMQX.

  • Message Inbound TPS: Refers to the number of messages EMQX receives per second, including messages published to EMQX from clients via MQTT protocol or HTTP API.
  • Message Outbound TPS: Refers to the number of messages EMQX sends per second to clients or external services, typically including MQTT messages subscribed by clients or messages forwarded to external systems via data integration.

What operations are included in message TPS?

Message TPS includes all types of message data exchanges.

Message Inbound

These are the messages sent from clients to the EMQX deployment, including:

  • MQTT PUBLISH: Messages published by clients using the MQTT protocol.
  • HTTP PUBLISH: Messages published via HTTP API (such as POST /mqtt/publish or /mqtt/publish_batch).

Message Outbound

These are the messages sent out from the EMQX deployment, including:

  • MQTT Subscription: Messages received by clients via subscribing to specific topics.
  • Data Integration Forwarding: Messages forwarded by EMQX to external services or messages received from external services and forwarded to clients.

What operations are not included in message TPS?

The following types of messages are not included in the message TPS calculation because they do not involve actual message data exchange:

  • Connection Operations: Operations like MQTT CONNECT and CONNACK are not counted in TPS.
  • Subscription Operations: Operations like MQTT SUBSCRIBE and SUBACK are not counted in TPS.

Why are data integration forwarding messages included in message TPS?

Data integration forwarding involves message exchanges between EMQX and external services, and these operations also consume system resources such as CPU, memory, and bandwidth. Therefore, to ensure proper resource allocation and optimize service stability, the message rate of data integration forwarding is included in the Message TPS calculation.

What happens if I exceed the Message TPS limit?

If the Message TPS exceeds the deployment's limit, the excess messages will be discarded. Please note that service unavailability due to exceeding the Message TPS limit is not covered under EMQX Cloud SLA. For more details, refer to our Service Level Agreement (SLA).