apache/seatunnel · error · IllegalArgumentException

Option 'operation_timeout_ms' must be greater than zero

Error message

Option 'operation_timeout_ms' must be greater than zero

What it means

AzureQueueSourceConfig.validate() enforces that operation_timeout_ms is strictly positive before building the source. The Azure Queue client requires a real wait duration for receive operations; zero or negative values would make polls return immediately or fail. This is a fail-fast configuration sanity check thrown as IllegalArgumentException from from().

Solutions

  1. Set operation_timeout_ms to a positive value (e.g. 60000) in the source config
  2. Ensure the value is not being overwritten to 0 by variable substitution or template defaults
  3. Note it must also be less than half of visibility_timeout_seconds (see related error 281)

Example fix

// before
operation_timeout_ms = 0
// after
operation_timeout_ms = 60000
Defensive patterns

Strategy: validation

Validate before calling

long operationTimeoutMs = Long.parseLong(config.get("operation_timeout_ms"));
if (operationTimeoutMs <= 0) throw new IllegalArgumentException("operation_timeout_ms must be > 0");

Prevention

When it happens

Trigger: Creating an AzureQueueSourceConfig via from() with operation_timeout_ms set to 0 or a negative number.

Common situations: Users copying a template config and blanking the value, templating systems substituting an empty/default 0, or trying to make polls non-blocking by setting it to 0.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueSourceConfig.java:104

        }
        if (batchSize < 1 || batchSize > MAX_BATCH_SIZE) {
            throw new IllegalArgumentException("Option 'batch_size' must be between 1 and 32");
        }
        if (visibilityTimeoutSeconds < 1
                || visibilityTimeoutSeconds > MAX_VISIBILITY_TIMEOUT_SECONDS) {
            throw new IllegalArgumentException(
                    "Option 'visibility_timeout_seconds' must be between 1 and 604800");
        }
        if (pollIntervalMillis <= 0) {
            throw new IllegalArgumentException(
                    "Option 'poll_interval_ms' must be greater than zero");
        }
        if (maxInFlightMessages < batchSize) {
            throw new IllegalArgumentException(
                    "Option 'max_in_flight_messages' must be greater than or equal to batch_size");
        }
        if (operationTimeoutMillis <= 0) {
            throw new IllegalArgumentException(
                    "Option 'operation_timeout_ms' must be greater than zero");
        }
        long visibilityTimeoutMillis = visibilityTimeoutSeconds * 1_000L;
        if (operationTimeoutMillis >= visibilityTimeoutMillis / 2) {
            throw new IllegalArgumentException(
                    "Option 'operation_timeout_ms' must be less than half of visibility_timeout_seconds");
        }
    }
}

View on GitHub (pinned to cf67b549a7)