{"record":{"id":"863c6cdabd5570dd","repo":"apache/seatunnel","slug":"option-batch-size-must-be-between-1-and-32","errorCode":null,"errorMessage":"Option 'batch_size' must be between 1 and 32","messagePattern":"Option 'batch_size' must be between 1 and 32","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":88,"sourceCode":"                                        AzureQueueStorageSourceOptions.VISIBILITY_TIMEOUT_SECONDS))\n                        .pollIntervalMillis(\n                                config.get(AzureQueueStorageSourceOptions.POLL_INTERVAL_MS))\n                        .maxInFlightMessages(\n                                config.get(AzureQueueStorageSourceOptions.MAX_IN_FLIGHT_MESSAGES))\n                        .operationTimeoutMillis(\n                                config.get(AzureQueueStorageSourceOptions.OPERATION_TIMEOUT_MS))\n                        .build();\n        sourceConfig.validate();\n        return sourceConfig;\n    }\n\n    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        }","sourceCodeStart":70,"sourceCodeEnd":106,"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#L70-L106","documentation":"AzureQueueSourceConfig.validate throws this when batch_size is outside the 1..MAX_BATCH_SIZE (32) range, matching the Azure Queue receiveMessages batch limit. It runs during from() so invalid batches fail at config time.","triggerScenarios":"Building AzureQueueSourceConfig via from() with batch_size < 1 or batch_size > 32, e.g. batch_size = 50 to 'speed up' reads.","commonSituations":"User mistook 32 for a configurable default and set 100; value supplied in seconds/percentage by mistake; auto-generated config produced 0.","solutions":["Set batch_size to an integer between 1 and 32 (e.g. 16)","Increase parallelism (source parallelism) instead of raising batch_size above 32","Remove the option to use the plugin default batch size"],"exampleFix":"// before\nbatch_size = 50\n// after\nbatch_size = 16","handlingStrategy":"validation","validationCode":"java\nif (batchSize < 1 || batchSize > 32) {\n    throw new IllegalArgumentException(\"batch_size must be between 1 and 32\");\n}","typeGuard":null,"tryCatchPattern":"java\ntry {\n    AzureQueueSourceConfig.from(config);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"batch_size\")) {\n        log.error(\"Clamp batch_size to 1..32 (Azure service limit)\");\n    } else { throw e; }\n}","preventionTips":["Remember 32 is the Azure Storage Queue receive limit, not a tunable default","Scale with parallelism, not batch size","Clamp values in config generators: Math.min(32, Math.max(1, n))"],"tags":["config","validation","azure","source"],"backgroundTag":"value-out-of-range","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"}