{"record":{"id":"314c59a20e57ce0f","repo":"conductor-oss/conductor","slug":"settings-are-undefined","errorCode":null,"errorMessage":"Settings are undefined","messagePattern":"Settings are undefined","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java","lineNumber":86,"sourceCode":"    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\n    @Override\n    public Observable<Message> observe() {\n        Observable.OnSubscribe<Message> onSubscribe = null;","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java#L68-L104","documentation":"Constructor guard on AMQPObservableQueue: the AMQPSettings argument is null. Thrown during construction. The Builder always creates an AMQPSettings via new AMQPSettings(properties, queueType).fromURI(queueURI), so this guard is hit by direct construction that omits settings.","triggerScenarios":"Calling the AMQPObservableQueue constructor directly with a null AMQPSettings.","commonSituations":"Custom/test wiring that passes null for settings; the caller forgot to build settings from the queue URI.","solutions":["Construct via the Builder, which builds AMQPSettings from properties and the queue URI.","If constructing directly, build settings first: new AMQPSettings(properties, queueType).fromURI(queueURI)."],"exampleFix":"// before: settings null\nnew AMQPObservableQueue(factory, addresses, useExchange, null, retry, batchSize, pollTimeInMS);\n\n// after: build settings from the queue URI\nAMQPSettings settings = new AMQPSettings(properties, queueType).fromURI(queueURI);\nnew AMQPObservableQueue(factory, addresses, useExchange, settings, retry, batchSize, pollTimeInMS);","handlingStrategy":"validation","validationCode":"if (settings == null) {\n    throw new IllegalArgumentException(\"settings required; build via AMQPSettings.fromURI\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the Builder, which builds AMQPSettings from properties and the queue URI.","When constructing directly, build settings first with new AMQPSettings(properties, queueType).fromURI(queueURI).","Validate settings in a construction 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"}