This topic describes hot to check the subscriptions between group IDs and topics in the Message Queue for Apache RocketMQ console 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.

What is a subscription?

In Message Queue for Apache RocketMQ, a group ID represents a consumer instance group. For most distributed applications, multiple consumer instances are often mounted to the same group ID. In Message Queue for Apache RocketMQ, a subscription is mainly composed of topics and tags, that is, the topics subscribed by all consumer instances under a group ID and the filtering rule tags of these topics.

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

View groups IDs that have subscribed to a topic

Prerequisites

At least one group ID that has subscribed to the topic is online.

Procedure

  1. Log on to the Message Queue for Apache RocketMQ console. In the top navigation bar, select the region, such as China (Hangzhou).
  2. On the Instances page, find the target instance and click Details in the Actions column.
  3. In the left-side navigation pane, click Topic Management.
  4. On the Topic Management page, find the target topic and click Subscription in the Actions column.sub-detail-topic

Verification

In the Subscription dialog box, the topic name, sending time of the latest message, all the online group IDs that have subscribed to the topic, and their consumption modes appear.sub-detail-topic1
You can also click Consumer Status in the Actions column to view the message consumption details of the group ID.consumer-status-topic

View the topics that a group ID has subscribed to

Prerequisites

The group ID you want to query is online.

Procedure

  1. Log on to the Message Queue for Apache RocketMQ console. In the top navigation bar, select the region, such as China (Hangzhou).
  2. On the Instances page, find the target instance and click Details in the Actions column.
  3. In the left-side navigation pane, click Group Management.
  4. On the Group Management page, find the target group ID and click Subscription in the Actions column.sub-group

Verification

In the Subscription dialog box, the name, online status, consumption mode of the group ID, as well as all subscribed topics and the message filtering rules of these topics appear.sub-detail-group