{"record":{"id":"d9a2accab0b6d475","repo":"flowable/flowable-engine","slug":"invalid-priority-value-for-channeldefinition-mu","errorCode":null,"errorMessage":"Invalid priority value for <channelDefinition> (must be an integer)","messagePattern":"Invalid priority value for <channelDefinition> \\(must be an integer\\)","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":213,"sourceCode":"        } else if (resolvedValueToUse instanceof Queue) {\n            result.add(((Queue) resolvedValueToUse).getName());\n        } else if (resolvedValueToUse instanceof Iterable) {\n            for (Object object : (Iterable<?>) resolvedValueToUse) {\n                resolveQueues(object, result, channelDefinition);\n            }\n        } else {\n            throw new IllegalArgumentException(\n                \"Channel definition \" + channelDefinition + \" cannot resolve \" + resolvedValue + \" as a String[] or a String or a Queue\");\n        }\n    }\n\n    protected Integer resolvePriority(RabbitInboundChannelModel channelDefinition) {\n        String priority = resolve(channelDefinition.getPriority());\n        if (StringUtils.hasText(priority)) {\n            try {\n                return Integer.valueOf(priority);\n            } catch (NumberFormatException ex) {\n                throw new IllegalArgumentException(\"Invalid priority value for \" +\n                    channelDefinition + \" (must be an integer)\", ex);\n            }\n        } else {\n            return null;\n        }\n    }\n\n    protected RabbitAdmin resolveAdmin(RabbitInboundChannelModel channelDefinition) {\n        String rabbitAdmin = resolve(channelDefinition.getAdmin());\n        if (StringUtils.hasText(rabbitAdmin)) {\n            Assert.state(this.beanFactory != null, \"BeanFactory must be set to resolve RabbitAdmin by bean name\");\n            try {\n                return this.beanFactory.getBean(rabbitAdmin, RabbitAdmin.class);\n            } catch (NoSuchBeanDefinitionException ex) {\n                throw new IllegalArgumentException(\"Could not register rabbit listener endpoint on [\" +\n                    channelDefinition + \"], no \" + RabbitAdmin.class.getSimpleName() + \" with id '\" +\n                    rabbitAdmin + \"' was found in the application context\", ex);\n            }","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java#L195-L231","documentation":"The channel definition's priority attribute is resolved as a String and must parse to an Integer for the Rabbit listener consumer priority. If it has text but is not a valid integer, resolvePriority throws this IllegalArgumentException (wrapping the NumberFormatException).","triggerScenarios":"Setting channelDefinition.setPriority(\"high\") or any non-numeric string like \"10x\", \"default\", or an expression resolving to non-numeric text, so Integer.valueOf fails.","commonSituations":"Configuring priority with a word instead of a number; placeholders resolving to values with whitespace or units (\"5 \"); copying priority formats from other systems (e.g. '0-9 labels'); typos.","solutions":["Set priority to a valid integer string, e.g. \"5\" or \"-1\"","Check the resolved string for hidden whitespace/units and trim it","Remove the priority attribute entirely if you want the default (resolvePriority returns null when blank)","Validate numeric fields at configuration-load time"],"exampleFix":"// before\nchannelDefinition.setPriority(\"high\");\n// after\nchannelDefinition.setPriority(\"5\");","handlingStrategy":"validation","validationCode":"String priority = channelDefinition.getPriority();\nif (priority != null && !priority.isBlank()) {\n    try { Integer.valueOf(priority.trim()); }\n    catch (NumberFormatException e) { throw new IllegalArgumentException(\"priority must be an integer: \" + priority); }\n}","typeGuard":null,"tryCatchPattern":"try {\n    processor.process(definition);\n} catch (IllegalArgumentException ex) {\n    if (ex.getMessage().contains(\"priority\")) {\n        log.error(\"Fix priority in {}: {}\", definition, ex.getMessage());\n    }\n    throw ex;\n}","preventionTips":["Store priority as an integer string without whitespace or units","Validate numeric fields when loading channel definitions","Leave priority blank rather than using symbolic names like 'high'"],"tags":["rabbitmq","configuration","spring"],"backgroundTag":"invalid-config-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}