{"record":{"id":"0d18c498349c33df","repo":"apache/seatunnel","slug":"option-max-in-flight-messages-must-be-greater-th","errorCode":null,"errorMessage":"Option 'max_in_flight_messages' must be greater than or equal to batch_size","messagePattern":"Option 'max_in_flight_messages' must be greater than or equal to batch_size","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueSourceConfig.java","lineNumber":100,"sourceCode":"    private void validate() {\n        AzureQueueConfigValidator.validateClient(this);\n        if (format == MessageFormat.TEXT && fieldDelimiter.isEmpty()) {\n            throw new IllegalArgumentException(\"Option 'field_delimiter' cannot be empty\");\n        }\n        if (batchSize < 1 || batchSize > MAX_BATCH_SIZE) {\n            throw new IllegalArgumentException(\"Option 'batch_size' must be between 1 and 32\");\n        }\n        if (visibilityTimeoutSeconds < 1\n                || visibilityTimeoutSeconds > MAX_VISIBILITY_TIMEOUT_SECONDS) {\n            throw new IllegalArgumentException(\n                    \"Option 'visibility_timeout_seconds' must be between 1 and 604800\");\n        }\n        if (pollIntervalMillis <= 0) {\n            throw new IllegalArgumentException(\n                    \"Option 'poll_interval_ms' must be greater than zero\");\n        }\n        if (maxInFlightMessages < batchSize) {\n            throw new IllegalArgumentException(\n                    \"Option 'max_in_flight_messages' must be greater than or equal to batch_size\");\n        }\n        if (operationTimeoutMillis <= 0) {\n            throw new IllegalArgumentException(\n                    \"Option 'operation_timeout_ms' must be greater than zero\");\n        }\n        long visibilityTimeoutMillis = visibilityTimeoutSeconds * 1_000L;\n        if (operationTimeoutMillis >= visibilityTimeoutMillis / 2) {\n            throw new IllegalArgumentException(\n                    \"Option 'operation_timeout_ms' must be less than half of visibility_timeout_seconds\");\n        }\n    }\n}\n","sourceCodeStart":82,"sourceCodeEnd":114,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueSourceConfig.java#L82-L114","documentation":"AzureQueueSourceConfig.validate throws this when max_in_flight_messages < batch_size. Each batch received needs at least that many in-flight slots, so a smaller value would make the pipeline unable to track a full batch of messages concurrently.","triggerScenarios":"Building AzureQueueSourceConfig via from() where max_in_flight_messages is set lower than batch_size, e.g. batch_size = 16 and max_in_flight_messages = 8.","commonSituations":"Tuning max_in_flight down for backpressure without checking batch_size; defaults tuned independently after changing batch_size; misunderstanding that the two options are unrelated.","solutions":["Raise max_in_flight_messages to be >= batch_size (e.g. equal to or a multiple of batch_size)","Or lower batch_size until it does not exceed max_in_flight_messages","Remove one of the options to use defaults that are already consistent"],"exampleFix":"// before\nbatch_size = 16\nmax_in_flight_messages = 8\n// after\nbatch_size = 16\nmax_in_flight_messages = 16","handlingStrategy":"validation","validationCode":"java\nif (maxInFlightMessages < batchSize) {\n    maxInFlightMessages = batchSize;\n}","typeGuard":null,"tryCatchPattern":"java\ntry {\n    AzureQueueSourceConfig.from(config);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"max_in_flight_messages\")) {\n        log.error(\"max_in_flight_messages must be >= batch_size\");\n    } else { throw e; }\n}","preventionTips":["Tune batch_size and max_in_flight_messages together","Set max_in_flight_messages to batch_size * parallelism as a rule of thumb","Re-check dependent options whenever batch_size changes"],"tags":["config","validation","azure","source"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}