apache/seatunnel · warning
Command is not dispatched yet
Error message
Command {} is not dispatched yet What it means
Logged in dispatch()'s default branch when a command prefix matched a known IngressCommand enum value that has no case in the switch. The server returns BAD_REQUEST. This is a developer-facing invariant warning: a new command was added to the enum but the dispatch switch was not extended.
Solutions
- Add a case for the unhandled command in dispatch()'s switch and implement its handler.
- If the server version is intentionally older, upgrade the server to match the collector's protocol.
- Ensure all IngressCommand values are covered (or add an exhaustive switch) when adding new commands.
Example fix
// before
switch (command) {
case COMMIT: return dispatchCommit(request);
case BATCH: return dispatchBatch(request);
// after
switch (command) {
case COMMIT: return dispatchCommit(request);
case BATCH: return dispatchBatch(request);
case ABORT: return dispatchAbort(request); Defensive patterns
Strategy: try-catch
Try / catch
String resp = dispatch(request); if (EdgeSocketResponseCode.BAD_REQUEST.getCode().equals(resp)) { log.warn("server does not dispatch command; check protocol version"); } Prevention
- When adding an IngressCommand value, update the dispatch switch in the same change
- Use an exhaustive switch (no default silently ignoring) or a unit test asserting every enum value is dispatched
- Keep collector/server protocol definitions in one shared module
When it happens
Trigger: IngressCommand.matchPrefix returns an enum constant other than COMMIT or BATCH, i.e. the enum gained a new command (e.g. HEARTBEAT, ABORT) that dispatch() does not handle.
Common situations: Partial upgrade where the collector was built against a newer protocol version with extra commands but the server is an older build; local development after adding a new IngressCommand without updating the switch.
Related errors
- Invalid BATCH batchId in request
- Invalid COMMIT batchId in request
- Malformed BATCH request, missing payload separator
- PROTOCOL_ERROR
- RetryingMetaStoreClient found but no compatible getProxy…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/69e68d5908bb05cd.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/protocol/IngressProtocolHandler.java:110
channel.writeLine(dispatch(record));
}
}
private String dispatch(String request) {
IngressCommand command = IngressCommand.matchPrefix(request);
if (command == null) {
log.warn(
"Unrecognized command prefix, got: {}",
EdgeSocketLogUtils.abbreviateForLog(request));
return EdgeSocketResponseCode.BAD_REQUEST.getCode();
}
switch (command) {
case COMMIT:
return dispatchCommit(request);
case BATCH:
return dispatchBatch(request);
default:
log.warn("Command {} is not dispatched yet", command);
return EdgeSocketResponseCode.BAD_REQUEST.getCode();
}
}
private String dispatchCommit(String request) {
Long batchId = parseBatchId(request, IngressCommand.COMMIT.prefix());
if (batchId == null || batchId <= 0) {
log.warn(
"Invalid COMMIT batchId in request: {}",
EdgeSocketLogUtils.abbreviateForLog(request));
return EdgeSocketResponseCode.INVALID_PARAM.getCode();
}
return handler.handleCommitRequest(batchId);
}
private String dispatchBatch(String request) {
int separatorIndex = request.indexOf(':', IngressCommand.BATCH.prefix().length());
if (separatorIndex < 0) {View on GitHub (pinned to cf67b549a7)