This topic describes how to create and delete groups and view group details in the Message Queue for Apache RocketMQ console.

Background information

A group contains producers or consumers that produce or consume messages of the same type based on the same logic. To use Message Queue for Apache RocketMQ to produce or consume messages, you must create groups to identify producer instances or consumer instances of the same type.

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

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region such as China (Hangzhou).
  4. On the Instances page, click the name of the instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Groups.
  6. On the Groups page, select a protocol for your client SDK and click Create Group.
    Message Queue for Apache RocketMQ supports TCP and HTTP for client SDKs.
  7. In the panel that appears, configure the Group ID and Description parameters and click OK.
    On the Groups page, you can view the group that you created.

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.
  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region such as China (Hangzhou).
  4. On the Instances page, click the name of the instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Groups.
  6. On the Groups page, find the group that you want to delete, click More in the Actions column, and then select Delete from the drop-down list.
  7. In the message that appears, click OK.
    On the Groups page, you can no longer view the group that you deleted.

Query the details of a group

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region such as China (Hangzhou).
  4. On the Instances page, click the name of the instance that you want to manage. The Instance Details page appears.
  5. In the left-side navigation pane, click Groups.
  6. On the Groups page, find the group whose details you want to view, and click the group ID or click Details in the Actions column. The Group Details page appears.
    On the Group Details page, you can view the details of the group.

More operations

On the Groups page, you can perform other operations based on your business requirements.

  1. In the left-side navigation pane, click Groups.
  2. 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: