{"record":{"id":"dd56418749d1d058","repo":"apache/seatunnel","slug":"option-queue-name-must-contain-3-63-lowercase-le","errorCode":null,"errorMessage":"Option 'queue_name' must contain 3-63 lowercase letters, numbers or single hyphens","messagePattern":"Option 'queue_name' must contain 3-63 lowercase letters, numbers or single hyphens","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/AzureQueueConfigValidator.java","lineNumber":35,"sourceCode":"\npackage org.apache.seatunnel.connectors.seatunnel.azure.queue.config;\n\nimport java.util.regex.Pattern;\n\nfinal class AzureQueueConfigValidator {\n\n    private static final Pattern QUEUE_NAME_PATTERN =\n            Pattern.compile(\"[a-z0-9](?:[a-z0-9-]{1,61}[a-z0-9])?\");\n\n    private AzureQueueConfigValidator() {}\n\n    static void validateClient(AzureQueueClientConfig config) {\n        requireNonBlank(config.getQueueName(), \"queue_name\");\n        if (config.getQueueName().length() < 3\n                || config.getQueueName().length() > 63\n                || !QUEUE_NAME_PATTERN.matcher(config.getQueueName()).matches()\n                || config.getQueueName().contains(\"--\")) {\n            throw new IllegalArgumentException(\n                    \"Option 'queue_name' must contain 3-63 lowercase letters, numbers or single hyphens\");\n        }\n        if (config.getAuthenticationType() == null) {\n            throw new IllegalArgumentException(\"Option 'authentication_type' is required\");\n        }\n\n        switch (config.getAuthenticationType()) {\n            case CONNECTION_STRING:\n                requireNonBlank(config.getConnectionString(), \"connection_string\");\n                rejectPresent(\n                        config.getEndpoint(),\n                        \"endpoint\",\n                        config.getAccountName(),\n                        \"account_name\",\n                        config.getAccountKey(),\n                        \"account_key\",\n                        config.getSasToken(),\n                        \"sas_token\");","sourceCodeStart":17,"sourceCodeEnd":53,"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/AzureQueueConfigValidator.java#L17-L53","documentation":"AzureQueueConfigValidator.validateClient rejects queue names that violate Azure Storage queue naming rules: length must be 3–63 characters, only lowercase letters, digits, and single (non-repeated) hyphens, matching QUEUE_NAME_PATTERN. Thrown as IllegalArgumentException before any client is created.","triggerScenarios":"validateClient called with queue_name shorter than 3 or longer than 63 chars, containing uppercase/invalid characters, or containing consecutive hyphens ('--').","commonSituations":"Uppercase or underscore in queue name (Azure forbids both); trailing/leading hyphen; accidentally using the storage account name or connection string as queue_name; double hyphen from templated names.","solutions":["Rename the queue to 3-63 lowercase letters, digits, and single hyphens (no '--', no leading/trailing hyphen)","Create the queue in Azure with a compliant name if it doesn't exist","Validate locally: java.util.regex match [a-z0-9](-[a-z0-9])* and length 3-63"],"exampleFix":"// before\nqueue_name = \"My_Queue--prod\"\n// after\nqueue_name = \"my-queue-prod\"","handlingStrategy":"validation","validationCode":"java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^[a-z0-9]([a-z0-9]-[a-z0-9])*$\");\nString q = config.getQueueName();\nboolean ok = q != null && q.length() >= 3 && q.length() <= 63 && p.matcher(q).matches() && !q.contains(\"--\");\nif (!ok) throw new IllegalArgumentException(\"Invalid Azure queue name: \" + q);","typeGuard":null,"tryCatchPattern":"try { validate(config); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"queue_name\")) { log.error(\"Rename queue to 3-63 lowercase chars/digits/single hyphens\"); } throw e; }","preventionTips":["Follow Azure queue naming: 3-63 chars, lowercase alphanumeric, single hyphens only, no leading/trailing hyphen","Never reuse account names or connection strings as queue names","Generate queue names programmatically with a slugify + length check","Add queue-name validation to your deployment config linter"],"tags":["azure-queue-storage","config-validation","naming"],"backgroundTag":"invalid-identifier-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}