Distributed Message Service RocketMQ

Deleting a Subscription Group

2024-07-04 06:14:18

Scenario

In RocketMQ, you may need to delete a subscription group in the following scenarios:

l   Business change: You can delete a subscription group if it is no longer needed for a business. For example, if a business no longer uses RocketMQ as the messaging middleware, or its subscription logic has changed, the subscription group is not needed.

l   Re-construct subscription logic: When the subscription logic changes significantly, you can delete the existing subscription group and re-create one. For example, the original subscription group is no longer satisfying, or you need to change of the number of consumers or the consumption policy for the subscription group.

l   Remove unnecessary subscription groups: In RocketMQ, some subscription groups were created during previous testing or development but are no longer needed in production. You can delete unnecessary subscription groups for fewer resource usage and simpler management.

Note: Before deleting a subscription group, ensure that all messages in the subscription group have been processed. Unconsumed messages in the subscription group may be lost after the subscription group is deleted. Before deleting a subscription group, you are advised to stop the consumers in the subscription group and ensure that all messages have been consumed or transferred to another subscription group.

To sum up, you can delete a subscription group in case of business changes, subscription logic reconstruction, and removal of unnecessary subscription groups. However, before deleting a subscription group, you must ensure that all messages in the subscription group have been processed to avoid message loss and other problems.

Procedure

1. Go to the subscription group management menu.

2. Select the subscription group to be deleted, and click Delete.


mTM0muGNG2bz