conductor-oss/conductor · error · RuntimeException
Exchange name is undefined
Error message
Exchange name is undefined
What it means
Thrown as RuntimeException by getOrCreateExchange when the exchange 'name' argument is empty (StringUtils.isEmpty). The name comes from settings.getQueueOrExchangeName(), which is parsed out of the AMQP queue URI. An empty name means the URI produced no usable exchange identifier, so the broker cannot be asked to declare an exchange.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java:558
return getOrCreateExchange(
connectionType,
settings.getQueueOrExchangeName(),
settings.getExchangeType(),
settings.isDurable(),
settings.autoDelete(),
settings.getArguments());
}
private AMQP.Exchange.DeclareOk getOrCreateExchange(
ConnectionType connectionType,
String name,
final String type,
final boolean isDurable,
final boolean autoDelete,
final Map<String, Object> arguments)
throws Exception {
if (StringUtils.isEmpty(name)) {
throw new RuntimeException("Exchange name is undefined");
}
if (StringUtils.isEmpty(type)) {
throw new RuntimeException("Exchange type is undefined");
}
Channel chn = null;
try {
LOGGER.debug("Creating exchange {} of type {}", name, type);
chn =
amqpConnection.getOrCreateChannel(
connectionType, getSettings().getQueueOrExchangeName());
return chn.exchangeDeclare(name, type, isDurable, autoDelete, arguments);
} catch (final Exception e) {
LOGGER.warn("Failed to create exchange {} of type {}", name, type, e);
throw e;
} finally {
if (chn != null) {
try {
amqpConnection.returnChannel(connectionType, chn);View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Check the AMQP event-queue URI in conductor config: it must contain a non-empty exchange name after 'amqp_exchange:'.
- Verify no property placeholder (${...}) was left unresolved — an empty substitution yields an empty name.
- Use the documented form: amqp_exchange:myExchange?exchangeType=topic&routingKey=myRoutingKey.
- Add a startup validation/log of the resolved URI so the empty name is visible before the broker call.
Example fix
// before amqp_exchange:?exchangeType=topic // after amqp_exchange:myExchange?exchangeType=topic
Defensive patterns
Strategy: validation
Validate before calling
import org.apache.commons.lang3.StringUtils;
String exchangeName = settings.getQueueOrExchangeName();
if (useExchange && StringUtils.isBlank(exchangeName)) {
throw new IllegalStateException(
"AMQP exchange URI must include a non-empty exchange name; resolved URI=" + queueURI);
} Prevention
- Validate the parsed exchange name is non-blank before calling getOrCreateExchange.
- Log the resolved URI at startup so an empty name is visible immediately.
- Ensure no property placeholder feeding the exchange name is left unresolved.
When it happens
Trigger: An AMQP event-queue URI with type amqp_exchange but an empty name segment (e.g. 'amqp_exchange:?exchangeType=topic'), or a URI that the regex accepted but whose 'name' capture group is blank. Occurs during queue initialization at startup or when an exchange-typed observer is first built.
Common situations: Misconfigured conductor.workflow.event-queues property; a templated/property-placeholder URI where the exchange name variable was never substituted; copy-paste of a queue URI with the name accidentally deleted.
Related errors
- Exchange type is undefined
- Queue name is undefined
- Queue name for publishing 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/49e2b13b3bd32283.
Report an issue: GitHub.