Croway opened a new pull request, #30284:
URL: https://github.com/apache/camel/pull/30284

   JIRA: [CAMEL-27117](https://issues.apache.org/jira/browse/CAMEL-27117)
   
   - `DirectConsumerNotAvailableException` only said `No consumers available on 
endpoint: <uri>`. With the default `block=true` it came after a 30 second wait, 
and it said neither that the producer waited nor why there was no consumer.
   - The message keeps that start and now adds why: the route that consumes 
from the endpoint and its status (Stopped, Suspended, ...), or that no route in 
the CamelContext does, with a close name of another direct endpoint (`did you 
mean direct://reportRoute?`). When the Rest DSL inlines routes (`inlineRoutes`) 
it also says that an inlined direct route cannot be called from other routes. 
It ends with how long the producer waited and the `block`, `timeout` and 
`failIfNoConsumers` options. For example: `No consumers available on endpoint: 
direct://reportReport?timeout=100. No route in CamelContext camel-1 consumes 
from it, did you mean direct://reportRoute? The producer waited 100 millis for 
a consumer (see the block, timeout and failIfNoConsumers options). 
Exchange[...]`
   - `KameletConsumerNotAvailableException` gets the same message: the 
Kamelet's route and its status, or that the CamelContext has no such route, and 
the wait.
   - `direct-component.adoc` has a new Usage section: calling a route like a 
method with `requestBody`, one route per endpoint, what happens when no route 
consumes from the endpoint, and the common causes. It also fixes `orderServer` 
in the Java example to `orderService`, as in the XML and YAML ones. The catalog 
copy is regenerated.
   - The message is built only on the failure path. Its start does not change, 
so tools that match `No consumers available on endpoint` still match.
   
   Tests: `DirectNoConsumerMessageTest` (camel-core, 9 tests: 8 fail before, 
all pass after; the control that sends to a running route passes both times) 
and `KameletProducerNoConsumerTest` (camel-kamelet, 4 tests: 3 fail before, all 
pass after). The other tests of `org.apache.camel.component.direct` (33 in 
total) and all camel-kamelet tests (165) pass.
   
   Upgrade guide: none. Only the message changes, and it keeps its start.
   
   _Claude Code on behalf of Federico Mariani_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to