apache/rocketmq · error · MQClientException

consumerGroup can not equal {DEFAULT_CONSUMER_GROUP}, please

Error message

consumerGroup can not equal {DEFAULT_CONSUMER_GROUP}, please specify another one.

What it means

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.

Source

Thrown at client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:786

        }

    }

    private void checkConfig() throws MQClientException {
        // check consumerGroup
        Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup());

        // consumerGroup
        if (null == this.defaultMQPullConsumer.getConsumerGroup()) {
            throw new MQClientException(
                "consumerGroup is null"
                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),
                null);
        }

        // consumerGroup
        if (this.defaultMQPullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) {
            throw new MQClientException(
                "consumerGroup can not equal "
                    + MixAll.DEFAULT_CONSUMER_GROUP
                    + ", please specify another one."
                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),
                null);
        }

        // messageModel
        if (null == this.defaultMQPullConsumer.getMessageModel()) {
            throw new MQClientException(
                "messageModel is null"
                    + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL),
                null);
        }

        // allocateMessageQueueStrategy
        if (null == this.defaultMQPullConsumer.getAllocateMessageQueueStrategy()) {
            throw new MQClientException(

View on GitHub (pinned to 293f588571)

Solutions

  1. Set an application-specific group name, e.g. "order-service-pull-consumer"
  2. Remove any fallback that defaults the group to DEFAULT_CONSUMER so misconfiguration surfaces as a null-check error instead
  3. Use a naming convention (app + purpose) validated in CI config checks

Example fix

// before
DefaultMQPullConsumer c = new DefaultMQPullConsumer("DEFAULT_CONSUMER");
c.start();

// after
DefaultMQPullConsumer c = new DefaultMQPullConsumer("order-service-pull");
c.start();
Defensive patterns

Strategy: validation

Validate before calling

if (MixAll.DEFAULT_CONSUMER_GROUP.equals(group)) throw new IllegalStateException("reserved group name");

Prevention

When it happens

Trigger: 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.

Common situations: Templates or scaffolding that pre-fill the default group name; environment-specific config files where one profile forgot to override the group property.

Related errors


AI-assisted analysis of apache/rocketmq@293f588571 (2026-08-14). Data as JSON: /api/errors/d850eb72b259e8ae. Report an issue: GitHub.