{"record":{"id":"9b12aeab52d56a51","repo":"conductor-oss/conductor","slug":"hosts-are-undefined","errorCode":null,"errorMessage":"Hosts are undefined","messagePattern":"Hosts are undefined","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java","lineNumber":463,"sourceCode":"        private final int batchSize;\n        private final int pollTimeInMS;\n        private final ConnectionFactory factory;\n        private final AMQPEventQueueProperties properties;\n\n        public Builder(AMQPEventQueueProperties properties) {\n            this.properties = properties;\n            this.addresses = buildAddressesFromHosts();\n            this.factory = buildConnectionFactory();\n            // messages polling settings\n            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 {","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java#L445-L481","documentation":"Builder.buildAddressesFromHosts() reads AMQPEventQueueProperties.getHosts(); if it is null or empty (StringUtils.isEmpty) the Builder constructor throws IllegalArgumentException before any queue is built. The hosts string is later parsed by Address.parseAddresses, so it must be non-empty first.","triggerScenarios":"Constructing `new AMQPObservableQueue.Builder(properties)` when the AMQP hosts property is missing or blank.","commonSituations":"The AMQP hosts property (e.g. conductor.amqp.hosts) is not set in the environment/profile; the property key is misspelled; the value is an empty string.","solutions":["Set the hosts property to a non-empty, comma-separated list of host[:port] entries.","Confirm the property key matches what AMQPEventQueueProperties.getHosts() binds to.","Fail fast at startup with a clear config check rather than at Builder construction."],"exampleFix":"# before: hosts not set -> 'Hosts are undefined'\n# (no conductor.amqp.hosts)\n\n# after: set a non-empty host list\nconductor.amqp.hosts=rmq1:5672,rmq2:5672","handlingStrategy":"validation","validationCode":"// Validate the hosts property before constructing the Builder\nif (StringUtils.isEmpty(properties.getHosts())) {\n    throw new IllegalArgumentException(\"conductor.amqp.hosts must be set (host[:port],...)\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the AMQP hosts property with a non-empty, comma-separated host[:port] list.","Validate required AMQP properties at application startup.","Use the same property key AMQPEventQueueProperties binds to."],"tags":["amqp","config","validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}