{"record":{"id":"e5515f12e536c725","repo":"t8y2/dbx","slug":"consumer-group-not-found-s","errorCode":null,"errorMessage":"consumer group not found: %s","messagePattern":"consumer group not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/rocketmq/consumers.go","lineNumber":169,"sourceCode":"\t}\n\treturn okResult(), nil\n}\n\nfunc (a *rocketMQAgent) getSubscriptionGroupConfig(params map[string]any) (any, error) {\n\tgroupID, err := requireString(params, \"groupId\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t_, config, _ := a.requireClient()\n\tctx, cancel := context.WithTimeout(context.Background(), config.RequestTimeout)\n\tdefer cancel()\n\tconfigs, err := a.collectSubscriptionGroupConfigs(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tgroupConfig := configs[groupID]\n\tif groupConfig == nil {\n\t\treturn nil, fmt.Errorf(\"consumer group not found: %s\", groupID)\n\t}\n\treturn subscriptionGroupConfigMap(groupConfig), nil\n}\n\nfunc (a *rocketMQAgent) alterSubscriptionGroupConfig(params map[string]any) (any, error) {\n\tgroupID, err := requireString(params, \"groupId\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t_, config, _ := a.requireClient()\n\tctx, cancel := context.WithTimeout(context.Background(), config.RequestTimeout)\n\tdefer cancel()\n\tconfigs, collectErr := a.collectSubscriptionGroupConfigs(ctx)\n\tif collectErr != nil {\n\t\treturn nil, collectErr\n\t}\n\tgroupConfig := configs[groupID]\n\tif groupConfig == nil {","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/rocketmq/consumers.go#L151-L187","documentation":"getSubscriptionGroupConfig collects all subscription group configs from the brokers and looks up the requested groupID; a nil result means the consumer group has never been created/used on this cluster, so it errors with the group name embedded.","triggerScenarios":"dispatch consumer-group get/config action with a groupId that doesn't exist in collectSubscriptionGroupConfigs output.","commonSituations":"Typo'd groupId; querying a group that hasn't consumed yet; wrong environment/cluster (group exists in prod, not in staging); group deleted by config cleanup.","solutions":["Verify the exact groupId spelling and that the consumer has connected at least once","List available consumer groups to confirm the target exists","Create the subscription group or point the call at the correct cluster"],"exampleFix":"// before\ngetSubscriptionGroupConfig(ctx, \"order-consumer\")  // group never created\n// after\ngetSubscriptionGroupConfig(ctx, \"order_consumer_group\") // exact existing groupId","handlingStrategy":"try-catch","validationCode":"groups, err := agent.Dispatch(ctx, \"consumers.list\", map[string]any{})\nif err != nil { return err }\nif !containsGroup(groups, \"order_consumer_group\") {\n    return fmt.Errorf(\"group order_consumer_group does not exist on this cluster\")\n}","typeGuard":"func groupExists(configs map[string]map[string]any, groupID string) bool {\n    return configs[groupID] != nil\n}","tryCatchPattern":"cfg, err := getSubscriptionGroupConfig(ctx, groupID)\nif err != nil && strings.HasPrefix(err.Error(), \"consumer group not found\") {\n    return createSubscriptionGroup(ctx, groupID) // or surface clear UX error\n}","preventionTips":["Copy groupIds from a cluster listing, not from memory","Confirm environment/stage before querying consumer groups","Create groups explicitly before reading their config"],"tags":["consumer-group","not-found","validation"],"backgroundTag":"resource-not-found","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}