0

There are two Rocket MQ clients, both of which belong to the same consumption group. How to set the message load balance consumption? It seems that one client has more consumption messages and the other has less, and the consumption is uneven.

flower
  • 2,212
  • 3
  • 29
  • 44

2 Answers2

2

This link should clarify your question.

Li Zhanhui
  • 61
  • 4
0
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("CID_JODIE_1");
consumer.subscribe("TopicTest", "*");

// MessageModel.CLUSTERING means all consumers consume load-balancely
// MessageModel.BROADCASTING means every consumer instance will consume all messages
consumer.setMessageModel(MessageModel.CLUSTERING);