The message queue JCQ supports the ConsumerGroup (similar to Kafka). The role of the consumer group is to manage consumers. Consumers in the same consumer group are intra-group relationships and will divide up messages. Consumers in different consumer groups are independent of each other.
The same consumer group can consume multiple topics, and multiple consumer groups can also consume the same topic. Here, Topic and ConsumerGroup are many to many. However, a consumer can only belong to one ConsumerGroup.
Must the number of consumers be less than or equal to the number of partitions under the same ConsumerGroup?
Yes, represented by Kafka, RocketMQ, etc.:
Advantages: Avoid Ack Offset locking; avoid message repetition and strictly ensure the order;
Disadvantages: In the case of stacking, the consumption of messages cannot be accelerated by adding Consumers. One slow message causes subsequent messages unable to be processed in time.
No, JCQ:
Advantages: In the case of stacking, you can speed up consumption by adding Consumers to deal with the problem of slow messages;
Disadvatage: The strict order of messages cannot be guaranteed, which may cause message duplication.
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通