{"record":{"id":"d7f0c456cf115dab","repo":"apache/rocketmq","slug":"consumergroup-can-not-equal","errorCode":null,"errorMessage":"consumerGroup can not equal ","messagePattern":"consumerGroup can not equal ","errorType":"exception","errorClass":"MQClientException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java","lineNumber":419,"sourceCode":"        // If assign function invoke before start function, then update pull task after initialization.\n        if (subscriptionType == SubscriptionType.ASSIGN) {\n            updateAssignPullTask(assignedMessageQueue.getAssignedMessageQueues());\n        }\n\n        for (String topic : topicMessageQueueChangeListenerMap.keySet()) {\n            Set<MessageQueue> messageQueues = fetchMessageQueues(topic);\n            messageQueuesForTopic.put(topic, messageQueues);\n        }\n        this.mQClientFactory.checkClientInBroker();\n    }\n\n    private void checkConfig() throws MQClientException {\n        // Check consumerGroup\n        Validators.checkGroup(this.defaultLitePullConsumer.getConsumerGroup());\n\n        // Check consumerGroup name is not equal default consumer group name.\n        if (this.defaultLitePullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) {\n            throw new MQClientException(\n                \"consumerGroup can not equal \"\n                    + MixAll.DEFAULT_CONSUMER_GROUP\n                    + \", please specify another one.\"\n                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),\n                null);\n        }\n\n        // Check messageModel is not null.\n        if (null == this.defaultLitePullConsumer.getMessageModel()) {\n            throw new MQClientException(\n                \"messageModel is null\"\n                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),\n                null);\n        }\n\n        // Check allocateMessageQueueStrategy is not null\n        if (null == this.defaultLitePullConsumer.getAllocateMessageQueueStrategy()) {\n            throw new MQClientException(","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/apache/rocketmq/blob/293f5885719fc4aa3619446a1900f58ccfcfdd29/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java#L401-L437","documentation":"MQClientException from DefaultLitePullConsumerImpl.checkConfig: the consumerGroup equals the reserved default string (\"DEFAULT_CONSUMER\" in MixAll.DEFAULT_CONSUMER_GROUP). Since this group is shared by anyone who forgets to configure a group, the client refuses to start with it.","triggerScenarios":"Constructing DefaultLitePullConsumer with the no-arg or default constructor and calling start() without setConsumerGroup(...), or explicitly passing the literal default group name \"DEFAULT_CONSUMER\".","commonSituations":"Quick prototypes copied from docs that skip group configuration; property-driven configs where the group key is misspelled so the default silently applies; refactoring from push to lite-pull consumer and dropping the group argument.","solutions":["Set an explicit group: consumer.setConsumerGroup(\"my-order-pull-group\") or new DefaultLitePullConsumer(\"my-order-pull-group\")","Fail fast at config load time if the group property is blank, before constructing the consumer","Check for typos in property keys feeding the consumer configuration"],"exampleFix":"// before\nDefaultLitePullConsumer c = new DefaultLitePullConsumer();\nc.start(); // consumerGroup can not equal DEFAULT_CONSUMER\n\n// after\nDefaultLitePullConsumer c = new DefaultLitePullConsumer(\"order-pull-group\");\nc.start();","handlingStrategy":"validation","validationCode":"if (group == null || group.isEmpty() || \"DEFAULT_CONSUMER\".equals(group)) {\n    throw new IllegalArgumentException(\"A concrete consumerGroup is required\");\n}\nDefaultLitePullConsumer c = new DefaultLitePullConsumer(group);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fail fast on blank group values at config load","Use constructor injection of the group name so it cannot be forgotten","Namespace groups per environment (e.g. order-pull-prod)"],"tags":["rocketmq","config","consumer","lite-pull","validation"],"backgroundTag":null,"analyzedSha":"293f5885719fc4aa3619446a1900f58ccfcfdd29","analyzedAt":"2026-08-14T11:50:13.822Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}