apache/seatunnel · error · IllegalArgumentException

Option 'poll_interval_ms' must be greater than zero

Error message

Option 'poll_interval_ms' must be greater than zero

What it means

Config validation in AzureQueueSourceConfig.validate: poll_interval_ms controls how often the source polls Azure Queue Storage; a zero or negative interval would busy-spin or be rejected by the polling scheduler, so it is rejected at source initialization.

Source

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

        sourceConfig.validate();
        return sourceConfig;
    }

    private void validate() {
        AzureQueueConfigValidator.validateClient(this);
        if (format == MessageFormat.TEXT && fieldDelimiter.isEmpty()) {
            throw new IllegalArgumentException("Option 'field_delimiter' cannot be empty");
        }
        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)

Solutions

  1. Set poll_interval_ms to a positive value (e.g. 1000)
  2. Remove the option to use the plugin default
  3. If lower latency is needed, reduce the value but keep it > 0 rather than eliminating the interval

Example fix

// before
poll_interval_ms = 0
// after
poll_interval_ms = 1000
Defensive patterns

Strategy: validation

Validate before calling

java
if (pollIntervalMs <= 0) {
    pollIntervalMs = 1000;
}

Try / catch

java
try {
    AzureQueueSourceConfig.from(config);
} catch (IllegalArgumentException e) {
    if (e.getMessage().contains("poll_interval_ms")) {
        log.error("poll_interval_ms must be greater than zero");
    } else { throw e; }
}

Prevention

When it happens

Trigger: Building AzureQueueSourceConfig via from() with poll_interval_ms <= 0, e.g. poll_interval_ms = 0 to 'poll as fast as possible'.

Common situations: User assumed 0 means no delay / continuous polling; milliseconds-vs-seconds confusion; unset template placeholder resolving 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/f19f753aa3f9c992. Report an issue: GitHub.