{"record":{"id":"d850eb72b259e8ae","repo":"apache/rocketmq","slug":"consumergroup-can-not-equal-default-consumer-grou","errorCode":null,"errorMessage":"consumerGroup can not equal {DEFAULT_CONSUMER_GROUP}, please specify another one.","messagePattern":"consumerGroup can not equal (.+?), please specify another one\\.","errorType":"validation","errorClass":"MQClientException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java","lineNumber":786,"sourceCode":"        }\n\n    }\n\n    private void checkConfig() throws MQClientException {\n        // check consumerGroup\n        Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup());\n\n        // consumerGroup\n        if (null == this.defaultMQPullConsumer.getConsumerGroup()) {\n            throw new MQClientException(\n                \"consumerGroup is null\"\n                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),\n                null);\n        }\n\n        // consumerGroup\n        if (this.defaultMQPullConsumer.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        // messageModel\n        if (null == this.defaultMQPullConsumer.getMessageModel()) {\n            throw new MQClientException(\n                \"messageModel is null\"\n                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),\n                null);\n        }\n\n        // allocateMessageQueueStrategy\n        if (null == this.defaultMQPullConsumer.getAllocateMessageQueueStrategy()) {\n            throw new MQClientException(","sourceCodeStart":768,"sourceCodeEnd":804,"githubUrl":"https://github.com/apache/rocketmq/blob/293f5885719fc4aa3619446a1900f58ccfcfdd29/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java#L768-L804","documentation":"Thrown by checkConfig() during start() when the consumer group equals the reserved default \"DEFAULT_CONSUMER\" (MixAll.DEFAULT_CONSUMER_GROUP). That value is a placeholder used across the codebase and cannot serve as a real group identity, so starting with it is rejected.","triggerScenarios":"Constructing DefaultMQPullConsumer with the one-arg constructor using \"DEFAULT_CONSUMER\" or MixAll.DEFAULT_CONSUMER_GROUP; copying sample code that passes the literal default string; a config default that falls back to the reserved name when no value is configured.","commonSituations":"Templates or scaffolding that pre-fill the default group name; environment-specific config files where one profile forgot to override the group property.","solutions":["Set an application-specific group name, e.g. \"order-service-pull-consumer\"","Remove any fallback that defaults the group to DEFAULT_CONSUMER so misconfiguration surfaces as a null-check error instead","Use a naming convention (app + purpose) validated in CI config checks"],"exampleFix":"// before\nDefaultMQPullConsumer c = new DefaultMQPullConsumer(\"DEFAULT_CONSUMER\");\nc.start();\n\n// after\nDefaultMQPullConsumer c = new DefaultMQPullConsumer(\"order-service-pull\");\nc.start();","handlingStrategy":"validation","validationCode":"if (MixAll.DEFAULT_CONSUMER_GROUP.equals(group)) throw new IllegalStateException(\"reserved group name\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Adopt an app-specific group naming convention","Never fall back to DEFAULT_CONSUMER in config defaults"],"tags":["rocketmq","pull-consumer","config","consumer-group","reserved-name"],"backgroundTag":null,"analyzedSha":"293f5885719fc4aa3619446a1900f58ccfcfdd29","analyzedAt":"2026-08-14T11:50:13.822Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}