Federico Mariani created CAMEL-27117:
----------------------------------------
Summary: camel-direct, camel-kamelet - say why no consumer is
available: the route and its status, the time waited, a close name
Key: CAMEL-27117
URL: https://issues.apache.org/jira/browse/CAMEL-27117
Project: Camel
Issue Type: Improvement
Components: camel-kamelet, camel-core
Reporter: Federico Mariani
When a producer finds no consumer, the exchange fails with only {{No consumers
available on endpoint: direct://foo}}. With the default {{block=true}} this
comes after a 30 second wait. The message does not say that the producer
waited, whether a route consumes from the endpoint but is stopped or suspended,
or that no route in the CamelContext does: the case of a route that was not
loaded, a typo in the name, a route in another CamelContext, or a direct route
that the Rest DSL inlined into a rest service. The Kamelet producer has the
same message.
{code:java}
from("direct:reportRoute").routeId("report").to("mock:report");
from("direct:off").routeId("off").autoStartup(false).to("mock:off");
// both wait 30 seconds, then fail with
// No consumers available on endpoint: direct://reportReport. Exchange[...]
// No consumers available on endpoint: direct://off. Exchange[...]
template.sendBody("direct:reportReport", "x");
template.sendBody("direct:off", "x");
{code}
Expected: the message keeps its start, {{No consumers available on endpoint:
<uri>}}, and adds the CamelContext name, the route that consumes from the
endpoint and its status, or that no route does (with a close name such as
{{direct://reportRoute}}, and a note when the Rest DSL inlines direct routes),
how long the producer waited, and the {{block}}, {{timeout}} and
{{failIfNoConsumers}} options. The direct component page says nothing about
this case either: add a section with the common causes.
_Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)