apache/rocketmq · error · AuthorizationException
batch ack entry is null.
Error message
batch ack entry is null.
What it means
Error "batch ack entry is null." thrown in apache/rocketmq.
Source
Thrown at auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:293
throw new AuthorizationException("retry topic does not match consumer group.");
}
} else {
topic = Resource.ofTopic(pullTopic);
result.add(DefaultAuthorizationContext.of(subject, topic, Action.SUB, sourceIp));
}
group = Resource.ofGroup(pullGroup);
result.add(DefaultAuthorizationContext.of(subject, group, Action.SUB, sourceIp));
break;
case RequestCode.BATCH_ACK_MESSAGE:
BatchAckMessageRequestBody batchAckBody = decodeRequiredBody(
command, BatchAckMessageRequestBody.class, "batch ack");
if (CollectionUtils.isEmpty(batchAckBody.getAcks())) {
throw new AuthorizationException("batch ack is empty.");
}
Set<String> ackResources = new LinkedHashSet<>();
for (BatchAck ack : batchAckBody.getAcks()) {
if (ack == null) {
throw new AuthorizationException("batch ack entry is null.");
}
addUniqueContext(result, ackResources, subject,
Resource.ofTopic(requireResource(ack.getTopic(), "topic")),
Action.SUB, sourceIp);
addUniqueContext(result, ackResources, subject,
Resource.ofGroup(requireResource(ack.getConsumerGroup(), "consumer group")),
Action.SUB, sourceIp);
}
break;
case RequestCode.QUERY_ASSIGNMENT:
QueryAssignmentRequestBody assignmentBody = decodeRequiredBody(
command, QueryAssignmentRequestBody.class, "query assignment");
result.add(DefaultAuthorizationContext.of(subject,
Resource.ofTopic(requireResource(assignmentBody.getTopic(), "topic")),
Action.SUB, sourceIp));
result.add(DefaultAuthorizationContext.of(subject,
Resource.ofGroup(requireResource(assignmentBody.getConsumerGroup(), "consumer group")),
Action.SUB, sourceIp));View on GitHub (pinned to 293f588571)
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.
When it happens
Trigger: Occurs when a batch ack request contains a null entry.
Common situations: Malformed batch ack request body where one of the decoded ack entries is null.
AI-assisted analysis of apache/rocketmq@293f588571 (2026-08-14).
Data as JSON: /api/errors/1098497bfaa3574c.
Report an issue: GitHub.