apache/rocketmq · error · AuthorizationException

batch ack is empty.

Error message

batch ack is empty.

What it means

Error "batch ack is empty." thrown in apache/rocketmq.

Source

Thrown at auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:288

                case RequestCode.LITE_PULL_MESSAGE:
                    String pullTopic = requireResource(fields.get(TOPIC), "topic");
                    String pullGroup = requireResource(fields.get(CONSUMER_GROUP), "consumer group");
                    if (NamespaceUtil.isRetryTopic(pullTopic)) {
                        if (!StringUtils.equals(pullTopic, MixAll.getRetryTopic(pullGroup))) {
                            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,

View on GitHub (pinned to 293f588571)

Solutions

  1. Ensure the batch ack request contains at least one ack entry before sending it to the broker.
  2. Check client batch-ack accumulation logic so empty batches are not submitted.
  3. Verify network/serialization issues are not truncating the ack list.

When it happens

Trigger: Occurs when a batch ack request contains no ack entries.

Common situations: Client sends a batch ack with an empty entry list, or the request body failed to decode into entries.


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