In the Message Queue for Apache RocketMQ console, you can view the subscriptions between group IDs and topics in real time. That is, you can check the topics that a group ID subscribed to and the group IDs that have subscribed to a topic.

Prerequisites

The group ID is in the Online state.

Subscriptions

In Message Queue for Apache RocketMQ, a group ID represents a consumer instance group. For most distributed applications, multiple consumer instances are mounted on the same group ID. In Message Queue for Apache RocketMQ, a subscription consists of a topic-tag pair. Each topic-tag pair includes the topic subscribed by all consumer instances within the group ID and the filtering rule tags of the topic.

The subscriptions of all consumer instances within the same group ID must be consistent. Otherwise, the message consumption logic is chaotic and message loss may occur. For more information, see Subscription consistency.

View groups IDs that have subscribed to a topic

  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, for example, China (Hangzhou).
  4. On the Instances page, find the instance, click More in the Actions column, and then selectTopics from the drop-down list.
  5. On the Topics page, find the topic, click More in the Actions column, and then select Online Groups from the drop-down list.
    On the Details of Online Groups tab of the page that appears, you can view the group IDs that have subscribed to the topic. The following figure shows an example.topic_sub_detail

    You can also click a group ID to view the details of the group ID.

View the topics that a group ID has subscribed to

  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, for example, China (Hangzhou).
  4. On the Instances page, find the instance, click More in the Actions column, and then select Groups from the drop-down list.
  5. On the Groups page, find the group ID and click Details in the Actions column.
    You can view the topics that the group has subscribed to.group_sub_detail

    You can also click a topic to view the details of the topic.