apache/seatunnel · error · GooglePubSubConnectorException

CONFIGURATION_FAILED

CONFIGURATION_FAILED

Error message

Google Pub/Sub source supports streaming jobs only

What it means

Thrown by GooglePubSubSource.getBoundedness(), which is consulted during job planning (including shouldRequireStreamingModeWithCheckpointing). Google Pub/Sub is an unbounded streaming source, so running it in a batch job is rejected up front with code CONFIGURATION_FAILED.

Source

Thrown at seatunnel-connectors-v2/connector-google-pubsub/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/pubsub/source/GooglePubSubSource.java:64

    private final CatalogTable catalogTable;
    private final DeserializationSchema<SeaTunnelRow> deserializationSchema;

    private JobContext jobContext;

    public GooglePubSubSource(
            GooglePubSubSourceConfig config,
            CatalogTable catalogTable,
            DeserializationSchema<SeaTunnelRow> deserializationSchema) {
        this.config = config;
        this.catalogTable = catalogTable;
        this.deserializationSchema = deserializationSchema;
    }

    @Override
    public Boundedness getBoundedness() {
        if (jobContext != null) {
            if (!JobMode.STREAMING.equals(jobContext.getJobMode())) {
                throw new GooglePubSubConnectorException(
                        GooglePubSubConnectorErrorCode.CONFIGURATION_FAILED,
                        "Google Pub/Sub source supports streaming jobs only");
            }
            if (!jobContext.isEnableCheckpoint()) {
                throw new GooglePubSubConnectorException(
                        GooglePubSubConnectorErrorCode.CONFIGURATION_FAILED,
                        "Google Pub/Sub source requires checkpointing to acknowledge messages");
            }
        }
        return Boundedness.UNBOUNDED;
    }

    @Override
    public String getPluginName() {
        return PLUGIN_NAME;
    }

    @Override

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set job.mode = STREAMING in the job configuration.
  2. Use a genuinely batch source (e.g. file/JDBC) if a batch job is actually required.
  3. If the job is submitted programmatically, ensure the JobConfig mode passed to the client is STREAMING.

Example fix

// before
env {
  job.mode = "BATCH"
}
// after
env {
  job.mode = "STREAMING"
}
Defensive patterns

Strategy: validation

Validate before calling

if (!"streaming".equalsIgnoreCase(jobConfig.getEnv().getJobMode())) {
    throw new IllegalArgumentException("GooglePubSub source requires job.mode = STREAMING");
}

Prevention

When it happens

Trigger: Submitting a SeaTunnel job with job.mode = BATCH that contains a GooglePubSub source; getBoundedness() detects JobMode != STREAMING and throws.

Common situations: Users copy a batch config template and swap in the Pub/Sub source without changing job.mode, or a scheduling wrapper runs streaming jobs in batch mode by default.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/dd3ec2b1c1a070dc. Report an issue: GitHub.