flowable/flowable-engine · error · FlowableException

Consumer not defined for ${endpointUri}

Error message

Consumer not defined for ${endpointUri}

What it means

FlowableEndpoint.process delegates an incoming exchange to the processor of the FlowableConsumer attached to the endpoint. Flowable throws this FlowableException when no consumer has been registered for the endpoint URI, i.e. no Camel route is consuming from this flowable endpoint, so the exchange cannot be delivered into a process.

Source

Thrown at modules/flowable-camel/src/main/java/org/flowable/camel/FlowableEndpoint.java:79

    protected boolean copyCamelBodyToBodyAsString;

    protected String processInitiatorHeaderName;

    protected Map<String, Object> returnVarMap = new HashMap<>();

    protected long timeout = 5000;

    protected int timeResolution = 100;

    public FlowableEndpoint(String uri, CamelContext camelContext) {
        super();
        setCamelContext(camelContext);
        setEndpointUri(uri);
    }

    public void process(Exchange ex) throws Exception {
        if (flowableConsumer == null) {
            throw new FlowableException("Consumer not defined for " + getEndpointUri());
        }
        flowableConsumer.getProcessor().process(ex);
    }

    @Override
    public Producer createProducer() throws Exception {
        FlowableProducer producer = new FlowableProducer(this, getTimeout(), getTimeResolution());
        producer.setRuntimeService(runtimeService);
        producer.setIdentityService(identityService);
        producer.setRepositoryService(repositoryService);
        producer.setManagementService(managementService);
        return producer;
    }

    @Override
    public Consumer createConsumer(Processor processor) throws Exception {
        return new FlowableConsumer(this, processor);
    }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Define and start a Camel route that consumes from the same flowable endpoint URI (from("flowable:processDefinitionKey")), so FlowableConsumer registers itself.
  2. Ensure the endpoint URI used by the producer/service task exactly matches the URI of the consuming route, including camelContext and parameters.
  3. Ensure the CamelContext is fully started before process executions signal the endpoint.
  4. Check lifecycle ordering: if the route was stopped (removeConsumer), restart it before signalling.

Example fix

// before: no consumer route defined anywhere
// after
from("flowable:helloProcess").to("log:received").to("direct:continue");
Defensive patterns

Strategy: validation

Validate before calling

CamelContext ctx = camelContext;
Endpoint ep = ctx.hasEndpoint("flowable:myProcess");
if (ep == null || !(ep instanceof FlowableEndpoint) || !((FlowableEndpoint) ep).getCamelContext().getRoutes().stream().anyMatch(r -> r.getConsumer() != null && r.getConsumer().getEndpoint() == ep)) {
    throw new IllegalStateException("No consuming route registered for flowable endpoint");
}

Try / catch

try {
    flowableEndpoint.process(exchange);
} catch (FlowableException e) {
    if (e.getMessage().startsWith("Consumer not defined")) {
        // deploy/start the consumer route or fail the exchange deliberately
    }
    throw e;
}

Prevention

When it happens

Trigger: A Camel route (or FlowableProducer) calls flowable:xxx.process(exchange) while no <from uri="flowable:xxx"/> route was started; consuming the endpoint before CamelContext starts the route; URI mismatch so a different endpoint instance got the consumer.

Common situations: Camel route for the process signal not deployed/started when the BPMN service task fires; endpoint URI parameter mismatch (e.g. different camelContext or processDefinitionKey) causing two distinct endpoints; stopping the route while processes still signal it.

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/5589286622999fea. Report an issue: GitHub.