{"record":{"id":"3276c601c38ac05c","repo":"conductor-oss/conductor","slug":"username-is-null-or-empty","errorCode":null,"errorMessage":"Username is null or empty","messagePattern":"Username is null or empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java","lineNumber":473,"sourceCode":"            this.batchSize = properties.getBatchSize();\n            this.pollTimeInMS = (int) properties.getPollTimeDuration().toMillis();\n        }\n\n        private Address[] buildAddressesFromHosts() {\n            // Read hosts from config\n            final String hosts = properties.getHosts();\n            if (StringUtils.isEmpty(hosts)) {\n                throw new IllegalArgumentException(\"Hosts are undefined\");\n            }\n            return Address.parseAddresses(hosts);\n        }\n\n        private ConnectionFactory buildConnectionFactory() {\n            final ConnectionFactory factory = new ConnectionFactory();\n            // Get rabbitmq username from config\n            final String username = properties.getUsername();\n            if (StringUtils.isEmpty(username)) {\n                throw new IllegalArgumentException(\"Username is null or empty\");\n            } else {\n                factory.setUsername(username);\n            }\n            // Get rabbitmq password from config\n            final String password = properties.getPassword();\n            if (StringUtils.isEmpty(password)) {\n                throw new IllegalArgumentException(\"Password is null or empty\");\n            } else {\n                factory.setPassword(password);\n            }\n            // Get vHost from config\n            final String virtualHost = properties.getVirtualHost();\n            ;\n            if (StringUtils.isEmpty(virtualHost)) {\n                throw new IllegalArgumentException(\"Virtual host is null or empty\");\n            } else {\n                factory.setVirtualHost(virtualHost);\n            }","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java#L455-L491","documentation":"Builder.buildConnectionFactory() reads AMQPEventQueueProperties.getUsername(); if it is null or empty the Builder constructor throws. The username is set on the rabbitmq ConnectionFactory, so it is mandatory.","triggerScenarios":"Constructing `new AMQPObservableQueue.Builder(properties)` when the AMQP username property is missing or blank.","commonSituations":"The AMQP username property is not set in the environment/profile; credentials were intended to come from a secret store that was not mounted; the property key is misspelled.","solutions":["Set the username property to a non-empty value.","Confirm the credential source (secret/env) is mounted and resolves before the Builder runs.","Verify the property key matches AMQPEventQueueProperties.getUsername()."],"exampleFix":"# before: username missing -> 'Username is null or empty'\n# (no conductor.amqp.username)\n\n# after: set the username\nconductor.amqp.username=guest","handlingStrategy":"validation","validationCode":"if (StringUtils.isEmpty(properties.getUsername())) {\n    throw new IllegalArgumentException(\"conductor.amqp.username must be set\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the AMQP username property; source it from a secret store in production.","Confirm the secret/env backing the username is mounted before the Builder runs.","Validate required credential properties at startup."],"tags":["amqp","config","validation","credentials"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}