Products

Message Queue

2022-02-21 06:21:00

Consumers and consumer groups

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.

Consumer characteristics

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.

Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通