{"record":{"id":"1098497bfaa3574c","repo":"apache/rocketmq","slug":"batch-ack-entry-is-null","errorCode":null,"errorMessage":"batch ack entry is null.","messagePattern":"batch ack entry is null\\.","errorType":"exception","errorClass":"AuthorizationException","httpStatus":null,"severity":"error","filePath":"auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java","lineNumber":293,"sourceCode":"                            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.\");\n                        }\n                        addUniqueContext(result, ackResources, subject,\n                            Resource.ofTopic(requireResource(ack.getTopic(), \"topic\")),\n                            Action.SUB, sourceIp);\n                        addUniqueContext(result, ackResources, subject,\n                            Resource.ofGroup(requireResource(ack.getConsumerGroup(), \"consumer group\")),\n                            Action.SUB, sourceIp);\n                    }\n                    break;\n                case RequestCode.QUERY_ASSIGNMENT:\n                    QueryAssignmentRequestBody assignmentBody = decodeRequiredBody(\n                        command, QueryAssignmentRequestBody.class, \"query assignment\");\n                    result.add(DefaultAuthorizationContext.of(subject,\n                        Resource.ofTopic(requireResource(assignmentBody.getTopic(), \"topic\")),\n                        Action.SUB, sourceIp));\n                    result.add(DefaultAuthorizationContext.of(subject,\n                        Resource.ofGroup(requireResource(assignmentBody.getConsumerGroup(), \"consumer group\")),\n                        Action.SUB, sourceIp));","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/apache/rocketmq/blob/293f5885719fc4aa3619446a1900f58ccfcfdd29/auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java#L275-L311","documentation":"Error \"batch ack entry is null.\" thrown in apache/rocketmq.","triggerScenarios":"Occurs when a batch ack request contains a null entry.","commonSituations":"Malformed batch ack request body where one of the decoded ack entries is null.","solutions":["Ensure every entry in the batch ack request is non-null and fully populated (messageQueue, offset, etc.).","Fix client code that builds the batch ack list to skip or fill incomplete entries.","Check for serialization mismatches between client and broker versions."],"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"}