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

  1. Provide a non-empty routing key: routingKey=myRoutingKey.
  2. Omit the routingKey param entirely if a blank key is not intended.
  3. 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

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


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/07fe62bf849978b8. Report an issue: GitHub.