{"record":{"id":"5589286622999fea","repo":"flowable/flowable-engine","slug":"consumer-not-defined-for-endpointuri","errorCode":null,"errorMessage":"Consumer not defined for ${endpointUri}","messagePattern":"Consumer not defined for (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-camel/src/main/java/org/flowable/camel/FlowableEndpoint.java","lineNumber":79,"sourceCode":"    protected boolean copyCamelBodyToBodyAsString;\n\n    protected String processInitiatorHeaderName;\n\n    protected Map<String, Object> returnVarMap = new HashMap<>();\n\n    protected long timeout = 5000;\n\n    protected int timeResolution = 100;\n\n    public FlowableEndpoint(String uri, CamelContext camelContext) {\n        super();\n        setCamelContext(camelContext);\n        setEndpointUri(uri);\n    }\n\n    public void process(Exchange ex) throws Exception {\n        if (flowableConsumer == null) {\n            throw new FlowableException(\"Consumer not defined for \" + getEndpointUri());\n        }\n        flowableConsumer.getProcessor().process(ex);\n    }\n\n    @Override\n    public Producer createProducer() throws Exception {\n        FlowableProducer producer = new FlowableProducer(this, getTimeout(), getTimeResolution());\n        producer.setRuntimeService(runtimeService);\n        producer.setIdentityService(identityService);\n        producer.setRepositoryService(repositoryService);\n        producer.setManagementService(managementService);\n        return producer;\n    }\n\n    @Override\n    public Consumer createConsumer(Processor processor) throws Exception {\n        return new FlowableConsumer(this, processor);\n    }","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-camel/src/main/java/org/flowable/camel/FlowableEndpoint.java#L61-L97","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Define and start a Camel route that consumes from the same flowable endpoint URI (from(\"flowable:processDefinitionKey\")), so FlowableConsumer registers itself.","Ensure the endpoint URI used by the producer/service task exactly matches the URI of the consuming route, including camelContext and parameters.","Ensure the CamelContext is fully started before process executions signal the endpoint.","Check lifecycle ordering: if the route was stopped (removeConsumer), restart it before signalling."],"exampleFix":"// before: no consumer route defined anywhere\n// after\nfrom(\"flowable:helloProcess\").to(\"log:received\").to(\"direct:continue\");","handlingStrategy":"validation","validationCode":"CamelContext ctx = camelContext;\nEndpoint ep = ctx.hasEndpoint(\"flowable:myProcess\");\nif (ep == null || !(ep instanceof FlowableEndpoint) || !((FlowableEndpoint) ep).getCamelContext().getRoutes().stream().anyMatch(r -> r.getConsumer() != null && r.getConsumer().getEndpoint() == ep)) {\n    throw new IllegalStateException(\"No consuming route registered for flowable endpoint\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    flowableEndpoint.process(exchange);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"Consumer not defined\")) {\n        // deploy/start the consumer route or fail the exchange deliberately\n    }\n    throw e;\n}","preventionTips":["Always define a Camel route consuming the exact flowable URI used by the producer.","Start the CamelContext and verify routes are started before processes signal the endpoint.","Keep endpoint URIs (including camelContext param) consistent via constants."],"tags":["camel","flowable","missing-consumer","endpoint-uri"],"backgroundTag":"resource-not-found","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"}