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

Background information

A group is a type of producers or consumers that produce or consume messages of the same type and publish or subscribe to messages based on the same logic. To use Message Queue for Apache RocketMQ for messaging, you must create groups to identify producers or consumers of the same type.

Usage notes

  • A group cannot be used across instances. For example, a group created in Instance A is unavailable in Instance B.
  • All clients in a group communicate with brokers over the same protocol. Message Queue for Apache RocketMQ allows you to use HTTP-based and TCP-based SDKs to send and receive messages. If the protocol selected when you create a group is TCP, the clients in the group can use only TCP-based SDKs, but cannot use HTTP-based SDKs to send and receive messages.
  • A group is required for consumers but is optional for producers.

Naming rules 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 start a group ID with CID or GID.
  • If the instance where a group resides has a namespace, the ID of the group must be unique in the instance. Specifically, the 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 topic name in Instance B.
  • If the instance where a group resides has no namespace, the ID of the group must be globally unique across instances and regions. Specifically, 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 client SDKs and click Create Group.
    Message Queue for Apache RocketMQ supports TCP and HTTP for client SDKs.
  7. In the panel that appears, set the Group ID and Description parameters and click OK.
    On the Groups page, you can view the group that you have created.

Delete a group

Notice After you delete a group, the consumers that are 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 have deleted.

View 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.

Perform other operations

On the Groups page, you can perform other related operations.

  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 consumption. You can also consume messages after a specified point in time regardless of whether the messages before this point in time have been 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 consumed messages in the group. You can also view the capacity of message consumption in the unit of transactions per second (TPS).

References

You can call the following API operations to manage groups: