{"record":{"id":"ded7bc1bc4b05f38","repo":"conductor-oss/conductor","slug":"queue-name-for-publishing-is-undefined","errorCode":null,"errorMessage":"Queue name for publishing is undefined","messagePattern":"Queue name for publishing is undefined","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java","lineNumber":108,"sourceCode":"        return autoDelete;\n    }\n\n    public final Map<String, Object> getArguments() {\n        return arguments;\n    }\n\n    public final String getContentEncoding() {\n        return contentEncoding;\n    }\n\n    /**\n     * Use queue for publishing\n     *\n     * @param queueName the name of queue\n     */\n    public void setQueue(String queueName) {\n        if (StringUtils.isEmpty(queueName)) {\n            throw new IllegalArgumentException(\"Queue name for publishing is undefined\");\n        }\n        this.queueOrExchangeName = queueName;\n    }\n\n    public String getQueueOrExchangeName() {\n        return queueOrExchangeName;\n    }\n\n    public String getExchangeBoundQueueName() {\n        if (StringUtils.isEmpty(exchangeBoundQueueName)) {\n            return String.format(\"bound_to_%s\", queueOrExchangeName);\n        }\n        return exchangeBoundQueueName;\n    }\n\n    public String getExchangeType() {\n        return exchangeType;\n    }","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java#L90-L126","documentation":"Thrown as IllegalArgumentException by AMQPSettings.setQueue when queueName is empty. setQueue is the publish-side entry that stores the queueOrExchangeName, so a blank value would later produce an invalid publish target; the guard rejects it immediately.","triggerScenarios":"Caller code invokes settings.setQueue(\"\") or settings.setQueue(null) before publishing. Also reachable if a publish path derives the queue name from an empty config/event field.","commonSituations":"Custom code building an AMQPSettings for publishing without validating the target name; an event name that resolved to empty being passed as the queue; integration code that assumed a default.","solutions":["Pass a non-empty queue name to setQueue, validated by the caller first.","If the name comes from dynamic input, validate StringUtils.isNotBlank before calling setQueue.","Provide a sensible default queue name in the calling configuration."],"exampleFix":"// before\nsettings.setQueue(eventName); // eventName may be empty\n// after\nif (StringUtils.isBlank(eventName)) {\n    throw new IllegalStateException(\"Cannot publish: event name is empty\");\n}\nsettings.setQueue(eventName);","handlingStrategy":"validation","validationCode":"import org.apache.commons.lang3.StringUtils;\npublic void safeSetQueue(AMQPSettings settings, String queueName) {\n    if (StringUtils.isBlank(queueName)) {\n        throw new IllegalArgumentException(\"Cannot set queue: name is null or empty\");\n    }\n    settings.setQueue(queueName);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate queue names with StringUtils.isNotBlank before calling setQueue.","Never derive a publish target from an unvalidated dynamic field.","Provide a non-empty default in calling code when the name could be absent."],"tags":["amqp","validation","publishing","configuration"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}