conductor-oss/conductor · error · IllegalArgumentException
The provided routing key is empty
Error message
The provided routing key is empty
What it means
Thrown as IllegalArgumentException inside fromURI's query-param loop when the routingKey parameter is present but its value is empty (e.g. &routingKey=). A topic/direct exchange publish needs a routing key, so the parser rejects an explicitly empty one.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java:205
if (kv.length == 2) {
if (kv[0].equalsIgnoreCase(
String.valueOf(PARAM_EXCHANGE_TYPE))) {
String value = kv[1];
if (StringUtils.isEmpty(value)) {
throw new IllegalArgumentException(
"The provided exchange type is empty");
}
exchangeType = value;
}
if (kv[0].equalsIgnoreCase(
(String.valueOf(PARAM_QUEUE_NAME)))) {
exchangeBoundQueueName = kv[1];
}
if (kv[0].equalsIgnoreCase(
(String.valueOf(PARAM_ROUTING_KEY)))) {
String value = kv[1];
if (StringUtils.isEmpty(value)) {
throw new IllegalArgumentException(
"The provided routing key is empty");
}
routingKey = value;
}
if (kv[0].equalsIgnoreCase(
(String.valueOf(PARAM_DURABLE)))) {
durable = Boolean.parseBoolean(kv[1]);
}
if (kv[0].equalsIgnoreCase(
(String.valueOf(PARAM_EXCLUSIVE)))) {
exclusive = Boolean.parseBoolean(kv[1]);
}
if (kv[0].equalsIgnoreCase(
(String.valueOf(PARAM_AUTO_DELETE)))) {
autoDelete = Boolean.parseBoolean(kv[1]);
}
if (kv[0].equalsIgnoreCase(
(String.valueOf(PARAM_DELIVERY_MODE)))) {View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Provide a non-empty routing key: routingKey=myRoutingKey.
- Omit the routingKey param entirely if a blank key is not intended.
- Ensure any placeholder feeding routingKey resolves to a non-empty string.
Example fix
// before amqp_exchange:myExchange?exchangeType=topic&routingKey= // after amqp_exchange:myExchange?exchangeType=topic&routingKey=conductor.events
Defensive patterns
Strategy: validation
Validate before calling
String uri = "amqp_exchange:myExchange?exchangeType=topic&routingKey=" + routingKey;
if (StringUtils.isBlank(routingKey)) {
throw new IllegalArgumentException("routingKey param must be non-empty in AMQP URI");
} Prevention
- Provide a non-empty routing key when including the routingKey param.
- Drop the param rather than emitting routingKey= empty.
- Ensure placeholders feeding routingKey resolve to non-empty strings.
When it happens
Trigger: An amqp_exchange URI containing routingKey= with no value. Fires when the param key matches PARAM_ROUTING_KEY and StringUtils.isEmpty(value) is true.
Common situations: Templated routingKey=${event} with the variable unset; URI edited and the routing key value deleted; relying on a default but still emitting an empty param.
Related errors
- Queue URI doesn't matches the expected regexp
- The provided exchange type is empty
- Exchange name is undefined
- Exchange type is undefined
- Queue name is undefined
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/07fe62bf849978b8.
Report an issue: GitHub.