Scenario
In RocketMQ, you may need to modify a subscription group in the following scenarios:
l Add or delete consumers: To add or delete consumers in a subscription group, you can modify the subscription group. For example, when the volume of messages increases, you can add consumers to improve consumption. When there are too many consumers, you can delete consumers to reduce resource consumption.
l Modify consumption policy: The consumers in a subscription group can use different consumption policies, such as cluster or broadcasting mode. In the cluster mode, a message is consumed by only one consumer in the subscription group. In broadcasting mode, each message is consumed once by all consumers in the subscription group. You can modify the subscription group and change the consumption policy to meet different business needs.
l Adjust consumption progress: You can use the consumption progress to record the position to which the messages have been consumed for the consumers in a subscription group. To re-consume certain messages or adjust the start point of consumption, you can modify the consumption progress of the consumers in a subscription group.
l Modify consumer parameters: You can set some parameters, such as the number of consumption threads, and message pulling policy for the consumers in a subscription group. You can modify the subscription group and adjust the consumer parameters to optimize consumption performance and resource utilization.
Note: When modifying a subscription group, ensure that the subscription group is unique so that it will not conflict with other subscription groups. You need to operate with caution because the distribution and consumption progress of messages may be affected after the subscription group is changed, which may lead to message loss or duplicate consumption.
To sum up, you can modify the subscription group and adjust the number of consumers, consumption policy, consumption progress and consumer parameters to meet different business needs and optimize consumption performance.
Procedure
1. Log in to the subscription group management menu. Click Modify in the subscription group list.
2. You can only modify the topics of a subscription group but cannot modify basic configuration information.