All Products
Search
Document Center

ApsaraMQ for MQTT:FAQ about sending and receiving messages

Last Updated:Sep 04, 2024

This topic provides answers to 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.

消息重试

Possible cause: Write operations are blocked for the Transmission Control Protocol (TCP) connection. 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, and logs are printed only after write operations are 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 discarded.

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 ApsaraMQ for MQTT. If the client is frequently disconnected, messages are continuously pulled and repeatedly pushed instead of being discarded.

Why does a message that indicates that the required permissions on a group are not granted appear when I send messages?

If you use a Resource Access Management (RAM) user to access ApsaraMQ for MQTT resources, you must grant the RAM user the required permissions on the resources. ApsaraMQ for MQTT allows you to grant permissions on instances, topics, and groups to RAM users. For more information, see Grant permissions to RAM users.

Why is a forward slash (/) added to the end of the names of subtopics when I transfer data from ApsaraMQ for RocketMQ to ApsaraMQ for MQTT?

Description: When you transfer data from ApsaraMQ for RocketMQ to ApsaraMQ for MQTT, you configure subtopics for ApsaraMQ for MQTT by using the mqttSecondTopic parameter. When you send messages, a forward slash (/) is added to the names of the subtopics.

Possible cause: Topic names and subtopic names in ApsaraMQ 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 in the required format.

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

The transactions per second (TPS) for sending messages exceeds the TPS limit specified in the instance specification. You can change the instance specification to increase the maximum messaging TPS.

Why am I unable to receive messages even though the offline message feature is configured?

You must first start consumers and then start producers.

If you first start producers to send messages to a topic that is never subscribed, consumers cannot receive offline messages from the topic even if the QoS parameter is set to 1 and the cleanSession parameter is set to false. If the topic is subscribed and the offline message feature is enabled, consumers can receive offline messages after the clients are reconnected.

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

ApsaraMQ for MQTT imposes limits on the number of subscribed topics and subscriptions in each client. If the limits are exceeded, some subscriptions do not take effect and messages in the subscribed topics cannot be received. For more information, see Clients.

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

ApsaraMQ for MQTT imposes limits on the client connections, messaging TPS, and subscriptions of each instance. If the limits are exceeded, throttling is triggered. To view the specification limits of an ApsaraMQ for MQTT instance, go to the Instance Information page in the ApsaraMQ for MQTT console.

If the specification limits of an ApsaraMQ for MQTT instance does not meet your business requirements, you can change the instance specification. For more information, see Upgrade or downgrade the configurations of an instance.