{"record":{"id":"e579940f567464d9","repo":"flowable/flowable-engine","slug":"queues-in-channeldefinition-must-not-be-null","errorCode":null,"errorMessage":"Queues in <channelDefinition> must not be null","messagePattern":"Queues in <channelDefinition> must not be null","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java","lineNumber":175,"sourceCode":"    protected String resolveExpressionAsStringOrInteger(String value, String attribute) {\n        if (!StringUtils.hasLength(value)) {\n            return null;\n        }\n        Object resolved = resolveExpression(value);\n        if (resolved instanceof String) {\n            return (String) resolved;\n        } else if (resolved instanceof Integer) {\n            return resolved.toString();\n        } else {\n            throw new IllegalStateException(\"The [\" + attribute + \"] must resolve to a String. \"\n                + \"Resolved to [\" + resolved.getClass() + \"] for [\" + value + \"]\");\n        }\n    }\n\n    protected String[] resolveQueues(RabbitInboundChannelModel channelDefinition) {\n        Collection<String> queues = channelDefinition.getQueues();\n        if (queues == null) {\n            throw new IllegalArgumentException(\"Queues in \" + channelDefinition + \" must not be null\");\n        }\n\n        List<String> resultQueues = new ArrayList<>();\n\n        for (String queue : queues) {\n            resolveQueues(resolveExpression(queue), resultQueues, channelDefinition);\n        }\n\n        return resultQueues.toArray(new String[0]);\n    }\n\n    protected void resolveQueues(Object resolvedValue, List<String> result, RabbitInboundChannelModel channelDefinition) {\n        Object resolvedValueToUse = resolvedValue;\n        if (resolvedValueToUse instanceof String[]) {\n            resolvedValueToUse = Arrays.asList((String[]) resolvedValueToUse);\n        }\n\n        if (resolvedValueToUse instanceof String) {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java#L157-L193","documentation":"resolveQueues requires the RabbitInboundChannelModel to carry a non-null queues collection before building the listener endpoint. A null queues value means the channel definition has no target queues at all, so an IllegalArgumentException is thrown.","triggerScenarios":"Processing an inbound Rabbit channel definition whose getQueues() returns null — typically the definition was created without the queues property populated, before createRabbitListenerEndpoint runs.","commonSituations":"Hand-written or generated channel definition JSON/XML missing the queues field; deserialization silently producing null when the key is absent; a code path that conditionally sets queues but never does.","solutions":["Set at least one queue in the channel definition's queues collection","Check the definition source (JSON/XML/builder) to ensure the 'queues' key is present and not dropped by deserialization","If queues are meant to be provided via exchange/routingKey instead, verify you are using the correct channel definition variant","Validate the channel model before passing it to the processor"],"exampleFix":"// before\nRabbitInboundChannelModel def = new RabbitInboundChannelModel();\n// queues never set -> getQueues() == null\n// after\nRabbitInboundChannelModel def = new RabbitInboundChannelModel();\ndef.setQueues(Collections.singletonList(\"my-queue\"));","handlingStrategy":"validation","validationCode":"if (channelDefinition.getQueues() == null || channelDefinition.getQueues().isEmpty()) {\n    throw new IllegalArgumentException(\"Rabbit inbound channel definition must declare at least one queue: \" + channelDefinition);\n}","typeGuard":null,"tryCatchPattern":"try {\n    processor.process(channelDefinition);\n} catch (IllegalArgumentException ex) {\n    log.error(\"Channel definition incomplete: {}\", ex.getMessage());\n    throw ex;\n}","preventionTips":["Always populate queues in channel definitions at creation time","Validate deserialized channel models before passing them to the processor","Add a schema/DTO check that marks queues as required"],"tags":["rabbitmq","configuration","spring"],"backgroundTag":"missing-required-config-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}