Basic Concept

The following content provides an overview of some basic concepts related to using the RTM service. You can quickly browse and review the relevant concepts and associated content.

RTM

RTM (Real-Time Messaging) is the abbreviation for Real-Time Data Transmission, which is a real-time data transmission service from LiveData.

User

A person using the business client, such as a game player, live streamer, or live audience.

Business Client

Refers to the business client that integrates the RTM Client SDK, and can also refer to the user terminal.

Business Server

Refers to the business server that integrates the RTM Server SDK.


Message

Refers to the general term for business data sent through RTM.

Message Type

Developers can define the type of data to be sent based on business requirements, distinguished by the mtype parameter. The value range for custom message types is 51-127.

Message types value less than 51 are reserved for internal use within the RTM system.

Message Content

The data content in a message supports both text strings and binary data formats.

Message Callback

When the business server needs to handle messages, it can use callback methods to forward the messages from RTM server to the business server.

History Message

Records of past messages sent/received by the business client.

Unread Message

Messages received when the client is offline/logged out.


Conversation/Session

Messages are generated between business clients or between business clients and business servers, forming a conversation. This includes P2P conversations, group conversations, and room conversations.

P2P

P2P (Point to Point) is a message exchange mode provided by RTM, where there is only one message sender and one message receiver.

Group

Group is a message exchange mode provided by RTM, where users can send messages to multiple people within a group. There can be multiple message senders and multiple message receivers.

Room

Room is a message exchange mode provided by RTM, where users can send messages to multiple people within a room. There can be multiple message senders and multiple message receivers.

Both group and room can be used for multiple users chats.
In a group, if a user does not actively exit, they will permanently exist in the group.
In a room, if a user goes offline, they will automatically exit the room.

Please refer to the table below for a detailed comparison between groups and rooms.

Function Group Room
Offline Message Support, default retention period is 7 days Not support
Number of Participants Default limit of 10,000 participants Default limit of 10,000 participants
Message Notifications Pushes offline group messages to users when they are offline No longer receives room messages when offline
Message Storage Store up to 500 messages per group Store up to 500 messages per room
History Message Default retention period is 7 days Default retention period is 7 days
History Message API Call Rate 10 calls per second 10 calls per second
User Join Limit Users can join multiple groups Need to enable join multiple rooms
Default limit of joining 10 rooms
Message Retrieval Group users can view previous group messages by filtering by time Room users can view previous room messages by filtering by time
Exit Active exit Active exit
Automatically exit the room after being offline for 1 minute
Dissolution Users can dissolve a group through the API When all users exit a room, the RTM server dissolves it
API Calls Allows client and server to call group-related APIs Allows client and server to call room-related APIs
Broadcast

Broadcast is a message exchange mode provided by RTM, where the server sends messages to all clients within a project.

P2P Message

P2P Message is a message type defined by RTM for point-to-point message exchange.

When sending a P2P message, the sender must specify the recipient, and only the specified recipient can receive the message. The recipient does not need to take any action to receive the message, unless friend relationship restrictions are set.

Chat

Chat is a special message type defined by RTM for instant messaging (IM) scenarios. It only supports sending text data.

Group Message

Group Message is a message type defined by RTM for message exchange within a group.

Room Message

Room Message is a message type defined by RTM for message exchange within a room.

Broadcast Message

Broadcast Message is a message type defined by RTM for project-wide message exchange.


Project

LiveData manages different businesses in the form of projects. You can create different projects for different businesses in the console to achieve data isolation. Currently, each account can create up to 100 projects.

Pid

LiveData uses Pid to distinguish projects. When creating a project in the console, Pid is automatically generated. Pid is the unique identifier of a project and will not be duplicated.

Uid

Uid, User Identifier, is used to identify a user within a project. Uid is the unique identifier of a user and will not be duplicated.

GroupId

GroupId is the unique identifier of a group within a project. GroupId is used to uniquely identify a group and will not be duplicated.

RoomId

RoomId is the unique identifier of a room within a project. RoomId is used to uniquely identify a room and will not be duplicated.