{"record":{"id":"a326db52d1389c99","repo":"conductor-oss/conductor","slug":"the-provided-exchange-type-is-empty","errorCode":null,"errorMessage":"The provided exchange type is empty","messagePattern":"The provided exchange type is empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java","lineNumber":192,"sourceCode":"        if (Objects.nonNull(matcher.group(\"type\"))) {\n            type = Type.fromString(matcher.group(\"type\"));\n        }\n        queueOrExchangeName = matcher.group(\"name\");\n        eventName = queueURI;\n        if (matcher.groupCount() > 1) {\n            final String queryParams = matcher.group(\"params\");\n            if (StringUtils.isNotEmpty(queryParams)) {\n                // Handle parameters\n                Arrays.stream(queryParams.split(\"\\\\s*\\\\&\\\\s*\"))\n                        .forEach(\n                                param -> {\n                                    final String[] kv = param.split(\"\\\\s*=\\\\s*\");\n                                    if (kv.length == 2) {\n                                        if (kv[0].equalsIgnoreCase(\n                                                String.valueOf(PARAM_EXCHANGE_TYPE))) {\n                                            String value = kv[1];\n                                            if (StringUtils.isEmpty(value)) {\n                                                throw new IllegalArgumentException(\n                                                        \"The provided exchange type is empty\");\n                                            }\n                                            exchangeType = value;\n                                        }\n                                        if (kv[0].equalsIgnoreCase(\n                                                (String.valueOf(PARAM_QUEUE_NAME)))) {\n                                            exchangeBoundQueueName = kv[1];\n                                        }\n                                        if (kv[0].equalsIgnoreCase(\n                                                (String.valueOf(PARAM_ROUTING_KEY)))) {\n                                            String value = kv[1];\n                                            if (StringUtils.isEmpty(value)) {\n                                                throw new IllegalArgumentException(\n                                                        \"The provided routing key is empty\");\n                                            }\n                                            routingKey = value;\n                                        }\n                                        if (kv[0].equalsIgnoreCase(","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/util/AMQPSettings.java#L174-L210","documentation":"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.","triggerScenarios":"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.","commonSituations":"Templated URI where exchangeType=${x} and x is unset; copy-paste leaving exchangeType= blank; configuration tooling that emits empty params.","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."],"exampleFix":"// before\namqp_exchange:myExchange?exchangeType=\n// after\namqp_exchange:myExchange?exchangeType=topic","handlingStrategy":"validation","validationCode":"// Validate the exchangeType param value before it reaches fromURI internals\nString uri = \"amqp_exchange:myExchange?exchangeType=\" + exchangeType;\nif (StringUtils.isBlank(exchangeType)) {\n    throw new IllegalArgumentException(\"exchangeType param must be non-empty in AMQP URI\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["amqp","configuration","validation","uri"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}