Group management
Groups let users exchange messages in real time during live streaming sessions. Use groups to drive interaction among viewers and between viewers and the streamer.
Prerequisites
Before you begin, make sure you have:
-
An interactive message application. For more information, see Create an application.
Create a group
-
Log on to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose .
-
Select a Live Center and an application under Applications, and then click Create Group.
-
In the Create Interactive Messaging Group dialog box, configure the following parameters.
Parameter
Description
Group ID
A unique identifier for the group. Uppercase letters, lowercase letters, and digits. Maximum length: 64 bytes.
Group Name
The display name of the group. Maximum length: 128 bytes.
Owner
The user ID of the group creator. Uppercase letters, lowercase letters, and digits. Maximum length: 64 bytes.
Administrator
The user IDs of up to three administrators, separated by commas (,). Uppercase letters, lowercase letters, and digits. Maximum length per ID: 64 bytes.
Group Additional Information
Custom metadata for the group. Maximum size: 32 KB.
-
Click OK.
Modify group settings
-
On the Groups page, find the target group and click View Details.
-
In the Group Information panel, modify the parameters as needed.
Send a message
-
On the Groups page, find the target group and click Send Message.
-
In the Send Message dialog box, configure the following parameters and click OK.
Parameter
Description
Sender ID
The user ID of the sender. Uppercase letters, lowercase letters, and digits. Maximum length: 64 bytes.
Sender Additional Information
Custom metadata for the sender. Maximum length: 512 bytes.
Message Type
The message type. Must be a number.
Message Content
The message body. Maximum size: 15 KB.
The group must be active to receive messages. A group is active when at least one user has joined. If a message fails to send, verify that the group has members.
Delete a group
-
On the Groups page, find the target group and click Delete Group.
-
In the confirmation dialog box, click OK.
Deletion is irreversible. Proceed with caution.
After a group is deleted:
-
All members receive a notification that the group has ended.
-
Messages from the deleted group remain queryable for 7 days.
-
The deleted group stays in the list for approximately 30 days before permanent removal.
Restore a deleted group
-
On the Groups page, find the deleted group and click Restore Group.
-
In the confirmation dialog box, click OK.
A deleted group remains in the list for 30 days. Restore the group within this period. After 30 days, the group is permanently deleted and cannot be restored. Messages stored before deletion remain queryable after restoration.
Message priority
During live streaming, viewers send messages at high frequency, generating a large volume of concurrent group messages. When the volume exceeds the rate limit, the backend discards some messages to maintain system stability. Rate limiting also improves client-side readability by preventing rapid message arrival from overwhelming the chat display.
Group messages support three priority levels. During rate limiting, the backend delivers higher-priority messages first. Assign a priority level based on the importance of each message type.
|
Priority |
Recommended message types |
|
HIGH |
Red envelopes, gifts, and other important messages |
|
MEDIUM |
Text messages, such as live comments |
|
NORMAL |
Reactions, such as likes |
Priority-based rate limiting
When messages per second from all users in a single group exceed the rate limit (default: 50 messages per second), the backend discards lower-priority messages first. To prevent complete starvation, the system guarantees that the latest message of each type is delivered within every 5-second interval, even for low-priority types.
Rate-limited messages are not delivered, cached, or stored. However, a success response is still returned to the sender.
Guaranteed delivery for HIGH priority
HIGH-priority messages are delivered first during rate limiting and support guaranteed delivery. If a user goes offline due to network issues and misses group messages, the SDK automatically retrieves the missed HIGH-priority messages when the user reconnects.
Supergroups
A supergroup is a group with more than 2,000 members. Supergroups behave differently from regular groups:
|
Behavior |
Details |
|
Member list |
Not queryable. The member list is cleared immediately when the group upgrades to a supergroup. |
|
Join/leave notifications |
Sent at intervals of at least 5 seconds. Notifications include an accurate member count but do not list individual users who joined or left. |
|
Downgrade to regular group |
A supergroup does not revert to a regular group until all members leave and the group shuts down. It reverts only when reopened. |
Limits
|
Resource |
Limit |
|
Groups per interactive message application |
5,000 (deleted groups do not count toward this quota) |
|
Retention of deleted groups in the list |
Approximately 30 days before permanent removal |