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

  1. Add a case for the unhandled command in dispatch()'s switch and implement its handler.
  2. If the server version is intentionally older, upgrade the server to match the collector's protocol.
  3. 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 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


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)