conductor-oss/conductor · error · IllegalArgumentException
Queue name for publishing is undefined
Error message
Queue name for publishing is undefined
What it means
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.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java:108
return autoDelete;
}
public final Map<String, Object> getArguments() {
return arguments;
}
public final String getContentEncoding() {
return contentEncoding;
}
/**
* Use queue for publishing
*
* @param queueName the name of queue
*/
public void setQueue(String queueName) {
if (StringUtils.isEmpty(queueName)) {
throw new IllegalArgumentException("Queue name for publishing is undefined");
}
this.queueOrExchangeName = queueName;
}
public String getQueueOrExchangeName() {
return queueOrExchangeName;
}
public String getExchangeBoundQueueName() {
if (StringUtils.isEmpty(exchangeBoundQueueName)) {
return String.format("bound_to_%s", queueOrExchangeName);
}
return exchangeBoundQueueName;
}
public String getExchangeType() {
return exchangeType;
}View on GitHub (pinned to cf7c3e4a8a)
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.
Example fix
// before
settings.setQueue(eventName); // eventName may be empty
// after
if (StringUtils.isBlank(eventName)) {
throw new IllegalStateException("Cannot publish: event name is empty");
}
settings.setQueue(eventName); Defensive patterns
Strategy: validation
Validate before calling
import org.apache.commons.lang3.StringUtils;
public void safeSetQueue(AMQPSettings settings, String queueName) {
if (StringUtils.isBlank(queueName)) {
throw new IllegalArgumentException("Cannot set queue: name is null or empty");
}
settings.setQueue(queueName);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Exchange name is undefined
- Exchange type is undefined
- Queue name is undefined
- Delivery mode must be 1 or 2
- Queue URI doesn't matches the expected regexp
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/ded7bc1bc4b05f38.
Report an issue: GitHub.