All Products
Search
Document Center

IoT Platform:What is RRPC?

Last Updated:Jun 03, 2026

MQTT uses asynchronous pub/sub messaging, which does not support synchronous server-to-device communication. IoT Platform provides Revert-RPC (RRPC) over MQTT to let your server send a request to a device and wait for a synchronous response.

Glossary

Term

Description

RRPC

Revert-RPC. RPC (Remote Procedure Call) uses a client/server model to request services remotely without understanding the underlying protocol. RRPC extends this model to enable synchronous request-response communication between a server and a device.

RRPC subscription topic

The topic a device subscribes to for RRPC messages. Contains a wildcard character.

RRPC request message

A message that IoT Platform sends to a device.

RRPC response message

A message that a device sends back to IoT Platform.

RRPC message ID

A unique ID that IoT Platform generates for each RRPC call to distinguish RRPC messages.

How RRPC works

RRPC

The process is as follows:

  1. (Optional) The device subscribes to the relevant RRPC topic.

    IoT Platform provides a custom RRPC request-response mechanism based on MQTT. To receive RRPC messages, a device must subscribe to the topic, and you must implement data processing logic on the device.

    • A device sends a SUB instruction to subscribe to a topic and receive IoT Platform messages. The Link SDK provides a subscription code example.

    • To implement RRPC message processing on the device, follow the RRPC feature development example.

  2. Your server calls the IoT Platform RRpc API.

  3. IoT Platform receives the request and sends an RRPC request message to the device. The message body contains the server request data and is sent to an IoT Platform-defined topic that includes the RRPC message ID.

  4. After the device receives the mobile terminated message, it sends an RRPC response to IoT Platform. The response is sent to a topic in a specified format that includes the RRPC message ID from the request.

  5. IoT Platform extracts the RRPC message ID and matches it with the original request.

  6. IoT Platform returns the response to your server.

  7. (Optional) The device processes the message from the subscribed topic.

Note

When you call the RRpc API:

  • If the device is offline, IoT Platform returns a device-offline error.

  • If the device does not respond within 8 seconds, IoT Platform returns a timeout error.

Topic types

Two topic formats are available:

The Remotely control a Raspberry Pi server topic demonstrates a practical RRPC implementation.