flowable/flowable-engine · error · IllegalArgumentException
Could not register rabbit listener endpoint on [<channelDefi
Error message
Could not register rabbit listener endpoint on [<channelDefinition>], no RabbitAdmin with id '<rabbitAdmin>' was found in the application context
What it means
When the channel definition specifies an admin bean by name, resolveAdmin looks it up in the BeanFactory as a RabbitAdmin. If no bean with that id exists, the IllegalArgumentException is thrown (wrapping NoSuchBeanDefinitionException) and endpoint registration fails.
Source
Thrown at modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java:228
try {
return Integer.valueOf(priority);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("Invalid priority value for " +
channelDefinition + " (must be an integer)", ex);
}
} else {
return null;
}
}
protected RabbitAdmin resolveAdmin(RabbitInboundChannelModel channelDefinition) {
String rabbitAdmin = resolve(channelDefinition.getAdmin());
if (StringUtils.hasText(rabbitAdmin)) {
Assert.state(this.beanFactory != null, "BeanFactory must be set to resolve RabbitAdmin by bean name");
try {
return this.beanFactory.getBean(rabbitAdmin, RabbitAdmin.class);
} catch (NoSuchBeanDefinitionException ex) {
throw new IllegalArgumentException("Could not register rabbit listener endpoint on [" +
channelDefinition + "], no " + RabbitAdmin.class.getSimpleName() + " with id '" +
rabbitAdmin + "' was found in the application context", ex);
}
} else {
return null;
}
}
protected AcknowledgeMode resolveAckMode(RabbitInboundChannelModel channelDefinition) {
String ackModeAttr = channelDefinition.getAckMode();
if (StringUtils.hasText(ackModeAttr)) {
Object ackMode = resolveExpression(ackModeAttr);
if (ackMode instanceof String) {
return AcknowledgeMode.valueOf((String) ackMode);
} else if (ackMode instanceof AcknowledgeMode) {
return (AcknowledgeMode) ackMode;
} else {
throw new IllegalArgumentException("ackMode in definition [ " + channelDefinition + " ] must resolve to a String or AcknowledgeMode");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Define a RabbitAdmin bean with the referenced id, e.g. @Bean public RabbitAdmin rabbitAdmin(ConnectionFactory cf){return new RabbitAdmin(cf);}
- Fix the admin id in the channel definition to match the actual bean name
- Remove the admin attribute if default admin resolution is acceptable
- Verify the bean isn't excluded by profiles/conditions
Example fix
// before
"admin": "rabbitAdmin" // no such bean exists
// after
@Bean
public RabbitAdmin rabbitAdmin(ConnectionFactory connectionFactory) {
return new RabbitAdmin(connectionFactory);
} Defensive patterns
Strategy: validation
Validate before calling
String adminName = channelDefinition.getAdmin();
if (adminName != null && !adminName.isBlank() && !applicationContext.containsBean(adminName)) {
throw new IllegalArgumentException("Referenced RabbitAdmin bean not found: " + adminName);
} Try / catch
try {
processor.process(definition);
} catch (IllegalArgumentException ex) {
if (ex.getMessage().contains("RabbitAdmin")) {
log.error("Missing RabbitAdmin bean: {}", ex.getMessage());
}
throw ex;
} Prevention
- Keep admin bean names in one constant/enum shared by definitions and @Bean methods
- Declare a default RabbitAdmin bean in shared configuration
- Use ApplicationContext.containsBean checks in startup validation
When it happens
Trigger: channelDefinition.getAdmin() resolves to a bean name (e.g. 'rabbitAdmin') that is not registered as a RabbitAdmin in the application context, during createRabbitListenerEndpoint.
Common situations: Typo in the admin bean id in the channel definition; RabbitAdmin bean removed or not declared (@Bean missing, wrong profile); definition copied from another project with different bean naming; conditional bean not created.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Could not register rabbit listener endpoint on [{channelDefi
- The [<attribute>] must resolve to a String. Resolved to [<cl
- Queues in <channelDefinition> must not be null
- Channel definition <channelDefinition> cannot resolve <resol
- Invalid priority value for <channelDefinition> (must be an i
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6941314e8f0e0362.
Report an issue: GitHub.