flowable/flowable-engine · error · IllegalArgumentException

Could not register rabbit listener endpoint on [{channelDefi

Error message

Could not register rabbit listener endpoint on [{channelDefinition}], no TaskExecutor with id '{executorBeanName}' was found in the application context

What it means

When the channel definition names an executor bean, resolveExecutor fetches it from the BeanFactory as a TaskExecutor. If no bean with that id exists, endpoint registration fails with this IllegalArgumentException (wrapping NoSuchBeanDefinitionException).

Source

Thrown at modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/rabbit/RabbitChannelDefinitionProcessor.java:260

                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");
            }
        } else {
            return null;
        }
    }

    protected TaskExecutor resolveExecutor(RabbitInboundChannelModel channelDefinition) {
        String executorBeanName = resolve(channelDefinition.getExecutor());
        if (StringUtils.hasText(executorBeanName)) {
            Assert.state(this.beanFactory != null, "BeanFactory must be set to resolve TaskExecutor by bean name");
            try {
                return this.beanFactory.getBean(executorBeanName, TaskExecutor.class);
            } catch (NoSuchBeanDefinitionException ex) {
                throw new IllegalArgumentException("Could not register rabbit listener endpoint on [" +
                    channelDefinition + "], no " + TaskExecutor.class.getSimpleName() + " with id '" +
                    executorBeanName + "' was found in the application context", ex);
            }
        } else {
            return null;
        }
    }

    protected Object resolveExpression(String value) {
        String resolvedValue = resolve(value);

        return this.resolver.evaluate(resolvedValue, this.expressionContext);
    }

    protected MessageListener createMessageListener(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) {
        return new RabbitChannelMessageListenerAdapter(eventRegistry, inboundChannelModel);
    }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Define a TaskExecutor bean with the referenced id, e.g. @Bean("listenerExecutor") ThreadPoolTaskExecutor ...
  2. Correct the executor bean name in the channel definition
  3. Remove the executor attribute to use the container's default executor
  4. Confirm the bean is actually created (profiles, conditional annotations)

Example fix

// before
"executor": "taskExecutor"  // no such bean exists
// after
@Bean("taskExecutor")
public TaskExecutor taskExecutor() {
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(4);
    return executor;
}
Defensive patterns

Strategy: validation

Validate before calling

String executorName = channelDefinition.getExecutor();
if (executorName != null && !executorName.isBlank() && !applicationContext.containsBean(executorName)) {
    throw new IllegalArgumentException("Referenced TaskExecutor bean not found: " + executorName);
}

Try / catch

try {
    processor.process(definition);
} catch (IllegalArgumentException ex) {
    if (ex.getMessage().contains("TaskExecutor")) {
        log.error("Missing TaskExecutor bean: {}", ex.getMessage());
    }
    throw ex;
}

Prevention

When it happens

Trigger: channelDefinition.getExecutor() resolves to a bean name that is not registered as a TaskExecutor in the application context, during createRabbitListenerEndpoint.

Common situations: Typo in executor bean name; executor bean defined under a different id or not at all; bean excluded by profile/condition; copying channel definitions between services with different bean names.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/c7b8a15fe7e4ee95. Report an issue: GitHub.