This topic describes how to create and delete groups and view group details in the Message Queue for Apache RocketMQ console.
Background information
Limits
- A maximum of 1,000 groups can be created in a single instance. We recommend that you reuse groups or delete unnecessary groups in a timely manner. If you want to create more groups, submit a ticket.
- Each group can be used in only one instance. For example, a group that is created in Instance A cannot be used in Instance B.
- In Message Queue for Apache RocketMQ, consumer groups can consume messages over HTTP or TCP. Different consumer groups
can use different protocols. We recommend that you create a group for each protocol.
- If multiple consumers in the same group use different protocols, message consumption may fail, and message duplication and message loss may occur.
- Approximately 1 to 2 hours is required to change the protocol that is used by the consumers in a group.
- If the consumers in a group consume messages by using a protocol that is different from the protocol that is displayed in the console, the data that is displayed in the console can be inaccurate. This does not affect the messaging of the group. You can submit a ticket to change the protocol that is displayed in the console to the protocol that is being used for the group.
- A group ID must be specified for each consumer. You do not need to specify a group ID for each producer.
Naming conventions for group IDs
- A group ID must be 2 to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_). We recommend that you include the prefix GID_ or GID- in the group ID.
- If the instance where a group resides has a namespace, the ID of the group must be unique in the instance. The group ID cannot be the same as an existing group ID or topic name in the instance. Group IDs and topic names in different instances can be the same. For example, a group ID in Instance A can be the same as a group ID or a topic name in Instance B.
- If the instance where a group resides does not have a namespace, the ID of the group must be globally unique across instances and regions. This means that the ID of the group cannot be the same as an existing group ID or topic name in Message Queue for Apache RocketMQ within your Alibaba Cloud account.
Note You can check whether an instance has a namespace in the Basic Information section on the Instance Details page in the Message Queue for Apache RocketMQ console.
Create a group
Delete a group
Notice After you delete a group, the consumer instances that can be identified by the ID
of the group stop receiving messages. Resources in the group are also deleted and
cannot be recovered. Exercise caution when you delete a group.
Query the details of a group
More operations
On the Groups page, you can perform other operations based on your business requirements.
- In the left-side navigation pane, click Groups.
- On the Groups page, find the group that you want to manage, click More in the Actions column, and then select one of the following options from the drop-down list:
- Quick Access: View the references that Message Queue for Apache RocketMQ provides for SDKs for multiple programming languages.
- Reset Consumer Offset: Reset consumer offsets to skip the accumulated or undesired messages and restart message consumption. You can also consume messages after a specific point in time regardless of whether the messages before this point in time are consumed. For more information, see Reset consumer offsets.
- Cloud Monitor: View the monitoring data of message production or consumption in the group.
- Message Consumption Chart: View the total number of messages to which consumers in the group subscribe. You can also view the message consumption rate that is measured by transactions per second (TPS).
References
You can call the following API operations to manage groups:
- OnsGroupCreate: creates a group.
- OnsGroupDelete: deletes a group.
- OnsGroupList: queries groups.
- OnsGroupSubDetail: queries the topics to which a group subscribes.
- OnsGroupConsumerUpdate: configures the read and write permissions on a group.