apache/seatunnel · error · IllegalArgumentException
Option 'max_in_flight' must be greater than zero
Error message
Option 'max_in_flight' must be greater than zero
What it means
Config validation in AzureQueueSinkConfig.validate: max_in_flight controls the number of concurrent outstanding send operations to Azure Queue Storage; zero or a negative value would deadlock or be rejected by the client, so it is rejected at sink initialization.
Source
Thrown at seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueSinkConfig.java:74
.format(config.get(AzureQueueStorageSinkOptions.FORMAT))
.fieldDelimiter(config.get(AzureQueueStorageSinkOptions.FIELD_DELIMITER))
.messageEncoding(config.get(AzureQueueStorageSinkOptions.MESSAGE_ENCODING))
.maxInFlight(config.get(AzureQueueStorageSinkOptions.MAX_IN_FLIGHT))
.operationTimeoutMillis(
config.get(AzureQueueStorageSinkOptions.OPERATION_TIMEOUT_MS))
.build();
sinkConfig.validate();
return sinkConfig;
}
private void validate() {
AzureQueueConfigValidator.validateClient(this);
if (format == MessageFormat.TEXT && fieldDelimiter.isEmpty()) {
throw new IllegalArgumentException("Option 'field_delimiter' cannot be empty");
}
if (maxInFlight <= 0) {
throw new IllegalArgumentException("Option 'max_in_flight' must be greater than zero");
}
if (operationTimeoutMillis <= 0) {
throw new IllegalArgumentException(
"Option 'operation_timeout_ms' must be greater than zero");
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Set max_in_flight to a positive integer (e.g. 100)
- Check the variable or expression feeding the option for a zero/negative value
- Remove the option to use the documented default
Example fix
// before max_in_flight = 0 // after max_in_flight = 100
Defensive patterns
Strategy: validation
Validate before calling
java
if (maxInFlight <= 0) {
maxInFlight = 100;
} Try / catch
java
try {
AzureQueueSinkConfig.from(config);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("max_in_flight")) {
log.error("max_in_flight must be a positive integer");
} else { throw e; }
} Prevention
- Never use 0 to mean 'unlimited' for this connector
- Clamp computed values with Math.max(1, value)
- Document positive-integer options in internal config templates
When it happens
Trigger: Building AzureQueueSinkConfig via from() with max_in_flight <= 0, e.g. max_in_flight = 0 or a negative value from a variable.
Common situations: User thought 0 means 'unlimited'; a computed config subtracted a value incorrectly; a template placeholder defaulted 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
- Option 'field_delimiter' cannot be empty
- Option 'operation_timeout_ms' must be greater than zero
- Option '${option}' cannot be blank
- Option '${valuesAndOptions[index + 1]}' is not valid for the
- Option 'field_delimiter' cannot be empty
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4ccc4466c0b32a4d.
Report an issue: GitHub.