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.
Asked
Active
Viewed 55 times
2 Answers
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);

Francis Lee
- 1
- 2