{"record":{"id":"4ccc4466c0b32a4d","repo":"apache/seatunnel","slug":"option-max-in-flight-must-be-greater-than-zero","errorCode":null,"errorMessage":"Option 'max_in_flight' must be greater than zero","messagePattern":"Option 'max_in_flight' must be greater than zero","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/AzureQueueSinkConfig.java","lineNumber":74,"sourceCode":"                        .format(config.get(AzureQueueStorageSinkOptions.FORMAT))\n                        .fieldDelimiter(config.get(AzureQueueStorageSinkOptions.FIELD_DELIMITER))\n                        .messageEncoding(config.get(AzureQueueStorageSinkOptions.MESSAGE_ENCODING))\n                        .maxInFlight(config.get(AzureQueueStorageSinkOptions.MAX_IN_FLIGHT))\n                        .operationTimeoutMillis(\n                                config.get(AzureQueueStorageSinkOptions.OPERATION_TIMEOUT_MS))\n                        .build();\n        sinkConfig.validate();\n        return sinkConfig;\n    }\n\n    private void validate() {\n        AzureQueueConfigValidator.validateClient(this);\n\n        if (format == MessageFormat.TEXT && fieldDelimiter.isEmpty()) {\n            throw new IllegalArgumentException(\"Option 'field_delimiter' cannot be empty\");\n        }\n        if (maxInFlight <= 0) {\n            throw new IllegalArgumentException(\"Option 'max_in_flight' must be greater than zero\");\n        }\n        if (operationTimeoutMillis <= 0) {\n            throw new IllegalArgumentException(\n                    \"Option 'operation_timeout_ms' must be greater than zero\");\n        }\n    }\n}\n","sourceCodeStart":56,"sourceCodeEnd":82,"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/AzureQueueSinkConfig.java#L56-L82","documentation":"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.","triggerScenarios":"Building AzureQueueSinkConfig via from() with max_in_flight <= 0, e.g. max_in_flight = 0 or a negative value from a variable.","commonSituations":"User thought 0 means 'unlimited'; a computed config subtracted a value incorrectly; a template placeholder defaulted to 0.","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"],"exampleFix":"// before\nmax_in_flight = 0\n// after\nmax_in_flight = 100","handlingStrategy":"validation","validationCode":"java\nif (maxInFlight <= 0) {\n    maxInFlight = 100;\n}","typeGuard":null,"tryCatchPattern":"java\ntry {\n    AzureQueueSinkConfig.from(config);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"max_in_flight\")) {\n        log.error(\"max_in_flight must be a positive integer\");\n    } else { throw e; }\n}","preventionTips":["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"],"tags":["config","validation","azure","sink"],"backgroundTag":"invalid-config-value","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"}