{"record":{"id":"3ebef3d6b6450f55","repo":"apache/rocketmq","slug":"retry-topic-does-not-match-consumer-group","errorCode":null,"errorMessage":"retry topic does not match consumer group.","messagePattern":"retry topic does not match consumer group\\.","errorType":"exception","errorClass":"AuthorizationException","httpStatus":null,"severity":"error","filePath":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java","lineNumber":275,"sourceCode":"                    }\n                    break;\n                case RequestCode.VIEW_MESSAGE_BY_ID:\n                    if (StringUtils.isNotBlank(fields.get(TOPIC))) {\n                        topic = Resource.ofTopic(fields.get(TOPIC));\n                        result.add(DefaultAuthorizationContext.of(subject, topic, Action.GET, sourceIp));\n                    }\n                    break;\n                case RequestCode.CONSUMER_SEND_MSG_BACK:\n                    group = Resource.ofGroup(requireResource(fields.get(GROUP), \"consumer group\"));\n                    result.add(DefaultAuthorizationContext.of(subject, group, Action.SUB, sourceIp));\n                    break;\n                case RequestCode.PULL_MESSAGE:\n                case RequestCode.LITE_PULL_MESSAGE:\n                    String pullTopic = requireResource(fields.get(TOPIC), \"topic\");\n                    String pullGroup = requireResource(fields.get(CONSUMER_GROUP), \"consumer group\");\n                    if (NamespaceUtil.isRetryTopic(pullTopic)) {\n                        if (!StringUtils.equals(pullTopic, MixAll.getRetryTopic(pullGroup))) {\n                            throw new AuthorizationException(\"retry topic does not match consumer group.\");\n                        }\n                    } else {\n                        topic = Resource.ofTopic(pullTopic);\n                        result.add(DefaultAuthorizationContext.of(subject, topic, Action.SUB, sourceIp));\n                    }\n                    group = Resource.ofGroup(pullGroup);\n                    result.add(DefaultAuthorizationContext.of(subject, group, Action.SUB, sourceIp));\n                    break;\n                case RequestCode.BATCH_ACK_MESSAGE:\n                    BatchAckMessageRequestBody batchAckBody = decodeRequiredBody(\n                        command, BatchAckMessageRequestBody.class, \"batch ack\");\n                    if (CollectionUtils.isEmpty(batchAckBody.getAcks())) {\n                        throw new AuthorizationException(\"batch ack is empty.\");\n                    }\n                    Set<String> ackResources = new LinkedHashSet<>();\n                    for (BatchAck ack : batchAckBody.getAcks()) {\n                        if (ack == null) {\n                            throw new AuthorizationException(\"batch ack entry is null.\");","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/apache/rocketmq/blob/293f5885719fc4aa3619446a1900f58ccfcfdd29/auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java#L257-L293","documentation":"Error \"retry topic does not match consumer group.\" thrown in apache/rocketmq.","triggerScenarios":"Occurs when the retry topic derived from a request does not match the consumer group supplied in the request.","commonSituations":"Client sends an ack or offset request against a retry topic (%RETRY%group) whose group segment differs from the group in the request header.","solutions":["Use the retry topic that corresponds to the consumer group (%RETRY%+consumerGroup) when sending retry-related requests.","Verify the consumer group name in the request matches the retry topic being accessed.","Avoid hand-crafting retry topics; let the client library derive them from the consumer group."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"293f5885719fc4aa3619446a1900f58ccfcfdd29","analyzedAt":"2026-08-14T11:50:13.822Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}