apache/rocketmq · error · IllegalArgumentException
cidAll is null or cidAll empty
Error message
cidAll is null or cidAll empty
What it means
QueryAssignmentProcessor.allocate requires cidAll — the sorted list of all consumer ids in the group — to be non-empty. Empty cidAll means the broker's consumer-group connection table had no members for the group at assignment time.
Source
Thrown at broker/src/main/java/org/apache/rocketmq/broker/processor/QueryAssignmentProcessor.java:286
//make sure each cid is assigned
allocateResult = allocate(consumerGroup, clientId, mqAll, cidAll);
}
}
return allocateResult;
}
private List<MessageQueue> allocate(String consumerGroup, String currentCID, List<MessageQueue> mqAll,
List<String> cidAll) {
if (StringUtils.isBlank(currentCID)) {
throw new IllegalArgumentException("currentCID is empty");
}
if (CollectionUtils.isEmpty(mqAll)) {
throw new IllegalArgumentException("mqAll is null or mqAll empty");
}
if (CollectionUtils.isEmpty(cidAll)) {
throw new IllegalArgumentException("cidAll is null or cidAll empty");
}
List<MessageQueue> result = new ArrayList<>();
if (!cidAll.contains(currentCID)) {
log.info("[BUG] ConsumerGroup: {} The consumerId: {} not in cidAll: {}",
consumerGroup,
currentCID,
cidAll);
return result;
}
int index = cidAll.indexOf(currentCID);
result.add(mqAll.get(index % mqAll.size()));
return result;
}
private RemotingCommand setMessageRequestMode(ChannelHandlerContext ctx,
RemotingCommand request) throws RemotingCommandException {View on GitHub (pinned to 293f588571)
Solutions
- Ensure at least one consumer of the group is registered (heartbeat ok) before assignment; retry the assignment request.
- Check client-to-broker connectivity and that consumers aren't crashing at startup.
- In exclusive-consume mode, avoid restarting 100% of a group's consumers at once.
Defensive patterns
Strategy: retry
Try / catch
catch (IllegalArgumentException e) { if (e.getMessage().contains("cidAll")) { waitAndRetryAssignmentAfterReconnect(); } else throw e; } Prevention
- Keep at least one group member alive during rolling restarts.
- Ensure consumer registration/heartbeat succeeds before assignment-heavy operations.
When it happens
Trigger: QUERY_ASSIGNMENT arrives for a group whose consumer-id list is empty (all members just disconnected, or consumer registration didn't complete) while mqAll is valid.
Common situations: All consumers of a group reconnecting simultaneously; consumer registered but heartbeat/registration lost; aggressive rebalancing churn during rolling restarts.
Related errors
- currentCID is empty
- mqAll is null or mqAll empty
- subscription group list is empty.
- group is null.
- subscribe lite operation is not supported for this group
AI-assisted analysis of apache/rocketmq@293f588571 (2026-08-14).
Data as JSON: /api/errors/7e35c199a90add30.
Report an issue: GitHub.