This topic provides answers to some commonly asked questions about sending and receiving messages by using ApsaraMQ for MQTT.

Why is a message retried multiple times at the same time?

Description: The same message is pushed multiple times at the same time.

Message retries

Possible cause: Write operations are blocked for Transmission Control Protocol (TCP) connection that is established. After the write operations are unblocked for the TCP connection, multiple data records for pushing a retry message are written at the same time. As a result, the push time for multiple retries of the message is the same. Retry messages are generated at intervals. The messages are temporarily stacked in the write cache area, and logs are printed only after the write operation is successful.

Why does the system repeatedly retry a message?

If the client is connected, a message is retried every 5 to 10 seconds. If the retry still fails after the specified number of retries, the message is dropped.

If the client is disconnected when messages are retried, the messages are still stored in the queue, the number of retries does not increase, and the consumer offset is not committed to the broker. The client pulls offline messages the next time you connect to Message Queue for MQTT. If the client is frequently disconnected, messages are continuously pulled and repeatedly pushed, and are not dropped.

Why does a message that indicates that the group ID is not granted permissions appear when I send messages?

If you are a RAM user, you must grant the RAM user permissions to access ApsaraMQ for MQTT resources. ApsaraMQ for MQTT supports the authorization of instances, topics, and groups. For more information, see Grant permissions to RAM users

Why is a forward slash specified after the subtopic when I transfer data from Message Queue for Apache RocketMQ to Message Queue for MQTT?

Description: When you transfer data from ApsaraMQ for RocketMQ to ApsaraMQ for MQTT, you need to specify the subtopic of ApsaraMQ for MQTT by using the mqttSecondTopic parameter. When you send messages, a forward slash (/) is specified after the subtopic.

Possible cause: Topic names and subtopic names in Message Queue for MQTT are suffixed with a forward slash (/) by default, the broker adds a forward slash (/) if a topic name or subtopic name is not standardized.

Why is the "Too many publishes in progress" error returned when I send messages?

The TPS for message sending exceeds the maximum TPS that is specified in the instance specification. You can change the instance specification to increase the maximum messaging TPS.

After the local test sends messages, why am I unable to receive them even if the offline messages feature is enabled and I am subscribed to the topics?

You must start the consumers first, and then start the producers to send messages.

If the producers are initiated to send messages first, and you are not subscribed to the required topics, you cannot receive offline messages even if the QoS parameter is set to 1 and the cleanSession parameter is set to false. If you are subscribed to the topics and the offline messages feature is enabled, you can consume the offline messages after the client is reconnected.

Why is the client unable to receive messages from some topics during message consumption?

In ApsaraMQ for MQTT, limits are imposed on the number of subscribed topics and the number of client subscriptions. If one of the limits are exceeded, some subscriptions do not take effect. As a result, messages from some subscribed topics cannot be received. For more information, see Limits on clients.

Does throttling occur when I use Message Queue for MQTT to send and receive messages?

In ApsaraMQ for MQTT, limits are imposed on the number of client connections, messaging transactions per second (TPS), and number of client subscriptions. If one of the limits is exceeded in a Message Queue for MQTT instance, the instance is throttled. To view the specification limits of a Message Queue for MQTT instance, go to the Instance Information page in the ApsaraMQ for MQTT console.

If you require a higher specification, you can upgrade your instance based on your business requirements. For more information, see Renew an instance and upgrade or downgrade the configurations of an instance.