conductor-oss/conductor · error · IllegalArgumentException
The provided exchange type is empty
Error message
The provided exchange type is empty
What it means
Thrown as IllegalArgumentException inside fromURI's query-param loop when the exchangeType parameter is present but its value is empty (e.g. &exchangeType=). The parser splits key=value and rejects an empty exchange type because RabbitMQ requires a concrete type.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java:192
if (Objects.nonNull(matcher.group("type"))) {
type = Type.fromString(matcher.group("type"));
}
queueOrExchangeName = matcher.group("name");
eventName = queueURI;
if (matcher.groupCount() > 1) {
final String queryParams = matcher.group("params");
if (StringUtils.isNotEmpty(queryParams)) {
// Handle parameters
Arrays.stream(queryParams.split("\\s*\\&\\s*"))
.forEach(
param -> {
final String[] kv = param.split("\\s*=\\s*");
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(View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Supply a concrete exchange type: exchangeType=topic|direct|fanout|headers.
- Remove the exchangeType param entirely if you want to rely on the configured default, rather than leaving it empty.
- Resolve any property placeholder so it does not yield an empty value.
Example fix
// before amqp_exchange:myExchange?exchangeType= // after amqp_exchange:myExchange?exchangeType=topic
Defensive patterns
Strategy: validation
Validate before calling
// Validate the exchangeType param value before it reaches fromURI internals
String uri = "amqp_exchange:myExchange?exchangeType=" + exchangeType;
if (StringUtils.isBlank(exchangeType)) {
throw new IllegalArgumentException("exchangeType param must be non-empty in AMQP URI");
} Prevention
- Always supply a concrete exchange type when including the exchangeType param.
- Omit the param entirely rather than leaving exchangeType= blank.
- Resolve any placeholder feeding exchangeType to a non-empty value.
When it happens
Trigger: An amqp_exchange URI containing exchangeType= with nothing after the equals sign. Fires only when the param key matches PARAM_EXCHANGE_TYPE and StringUtils.isEmpty(value) is true.
Common situations: Templated URI where exchangeType=${x} and x is unset; copy-paste leaving exchangeType= blank; configuration tooling that emits empty params.
Related errors
- Queue URI doesn't matches the expected regexp
- The provided routing key 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/a326db52d1389c99.
Report an issue: GitHub.