{"record":{"id":"0200e3f0bf77bef9","repo":"conductor-oss/conductor","slug":"addresses-are-undefined","errorCode":null,"errorMessage":"Addresses are undefined","messagePattern":"Addresses are undefined","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java","lineNumber":83,"sourceCode":"    private int pollTimeInMS;\n    private AMQPConnection amqpConnection;\n\n    protected LinkedBlockingQueue<Message> messages = new LinkedBlockingQueue<>();\n    private volatile boolean running;\n\n    public AMQPObservableQueue(\n            ConnectionFactory factory,\n            Address[] addresses,\n            boolean useExchange,\n            AMQPSettings settings,\n            AMQPRetryPattern retrySettings,\n            int batchSize,\n            int pollTimeInMS) {\n        if (factory == null) {\n            throw new IllegalArgumentException(\"Connection factory is undefined\");\n        }\n        if (addresses == null || addresses.length == 0) {\n            throw new IllegalArgumentException(\"Addresses are undefined\");\n        }\n        if (settings == null) {\n            throw new IllegalArgumentException(\"Settings are undefined\");\n        }\n        if (batchSize <= 0) {\n            throw new IllegalArgumentException(\"Batch size must be greater than 0\");\n        }\n        if (pollTimeInMS <= 0) {\n            throw new IllegalArgumentException(\"Poll time must be greater than 0 ms\");\n        }\n        this.useExchange = useExchange;\n        this.settings = settings;\n        this.batchSize = batchSize;\n        this.amqpConnection = AMQPConnection.getInstance(factory, addresses, retrySettings);\n        this.retrySettings = retrySettings;\n        this.setPollTimeInMS(pollTimeInMS);\n    }\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java#L65-L101","documentation":"Constructor guard on AMQPObservableQueue: the addresses array is null or has length 0. Thrown during construction. Like the factory check, the Builder derives addresses from hosts, so this guard is mostly hit by direct construction with a missing addresses argument.","triggerScenarios":"Calling the AMQPObservableQueue constructor directly with a null or empty Address[]; the Builder produced an empty array because Address.parseAddresses returned nothing.","commonSituations":"Direct construction without addresses; a misconfigured hosts property that parsed to an empty list.","solutions":["Construct via the Builder, which parses addresses from the configured hosts.","If constructing directly, pass a non-empty Address[] (e.g. Address.parseAddresses(hosts)).","Verify the hosts property is set and parses to at least one address."],"exampleFix":"// before: addresses null\nnew AMQPObservableQueue(factory, null, useExchange, settings, retry, batchSize, pollTimeInMS);\n\n// after: supply a parsed address list\nAddress[] addresses = Address.parseAddresses(\"host1:5672,host2:5672\");\nnew AMQPObservableQueue(factory, addresses, useExchange, settings, retry, batchSize, pollTimeInMS);","handlingStrategy":"validation","validationCode":"if (addresses == null || addresses.length == 0) {\n    throw new IllegalArgumentException(\"addresses required; set hosts and use the Builder\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the Builder, which derives addresses from the hosts property.","Confirm the hosts property parses to at least one Address before constructing.","Validate direct-construction arguments in a helper."],"tags":["amqp","config","validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}