Message Playback resends recorded device communication messages to simulate real-world device operations. You can replay device-to-cloud or cloud-to-device messages from a specific historical time period for product development, testing, or backfilling messages after an exception.
Supported message types
-
device-to-cloud messages
-
AMQP server-side subscription-based consumer group: Replay device messages routed through a specified consumer group.
-
Data forwarding: Replay device messages forwarded by a specified message parser.
-
-
cloud-to-device messages
Replay messages sent from your business server or IoT Platform to all devices under a product or to a single device.
Limitations
-
Only Enterprise Edition instances support Message Playback.
-
IoT Platform retains messages with QoS 0 for one day and messages with QoS 1 for seven days. Ensure that data exists within the time range that you select for playback.
-
If you replay messages for an AMQP server-side subscription-based consumer group, the client for that consumer group must be online.
-
If you replay messages using the Data forwarding feature, the related data forwarding rule or message parser must be running.
-
Message playback consumes upstream and downstream message TPS or message forwarding TPS from your Enterprise Edition instance, proportional to the number of replayed messages. A playback task will not exceed 50% of the available upstream and downstream message TPS or message forwarding TPS of the instance.
Create a message playback task
-
Log on to the IoT Platform console.
-
On the Instance Overview page, select the target environment, find your target instance, and click its ID or alias.
-
In the left-side navigation pane, choose .
-
Select a product and click the Message Playback tab.
-
Click Create Playback Task.
-
Follow the on-screen instructions to select a Playback Period and a Message Type for Playback.
Note the following limits displayed in the UI: the maximum playback period is seven days; QoS 0 messages are retained for one day and QoS 1 for seven days; a playback task will not consume more than 50% of the available TPS of the instance. For Message Type for Playback, select Messages reported from devices to IoT Platform or Messages sent from IoT Platform to devices. You must also select the target consumer group. The default value is Default Consumer Group.
-
Click OK.
The task is created with an initial status of Creating, after which the status changes to Not Started.
Start a message playback task
Start the task to begin replaying messages.
-
Find the task in the list and click Start in the Actions column.
-
Click OK.
The task status changes to Started. When playback finishes, the status becomes Completed.
View replayed messages
After a playback task is Completed, view the replayed messages on the Cloud Run Logs tab. For more information, see Cloud Run Logs.
Other operations
-
To pause a running task, click Stop in the Actions column and then click OK to pause the playback.
-
To delete a stopped or completed task, click Delete in the Actions column and then click OK.