[
https://issues.apache.org/jira/browse/CAMEL-25429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-25429.
---------------------------------
Fix Version/s: 4.23.0
Resolution: Fixed
Fixed for 4.23.0:
* https://github.com/apache/camel/pull/27557 - the route topology tells calls
from error paths: each edge has kind (call or error), and an error path says
via (errorHandler, onException) and handling (handled, continued, notHandled).
Error paths only from routes whose error handler acts (none from
noErrorHandler). The diagrams draw the calls only; the text output lists error
paths with ..>.
* https://github.com/apache/camel/pull/27560 - the camel-jbang monitor: x shows
the error handling in a frame of its own, in the topology (the routes reached
only on error, where their failures come from; selecting one highlights its
senders) and in the route view (the route shows its own steps; its onException
clauses and where its failures go in a frame below). A dim lightning mark on
routes with error handling.
* https://github.com/apache/camel/pull/27563 - camel overview lists the error
handling apart from the flows: global handlers by what they are, a route's own
error handling, the routes the failures go to, and the routes with
noErrorHandler.
Left for 4.24: the error handling in camel-diagram exports and the architecture
view, and findings (an error route that sends its own failures to itself, a
noErrorHandler route nothing calls, an onException to an endpoint no route
consumes).
> camel-jbang - route topology: show dead letter and onException targets as
> error paths from the route whose error handler acts
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-25429
> URL: https://issues.apache.org/jira/browse/CAMEL-25429
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.23.0
>
>
> The route topology of a project (the topology/architecture diagram of
> camel-jbang and the topology the camel-jbang MCP tools return) draws the
> target of a dead letter channel or onException wrongly.
> Example: fail-well/error-handling in camel-jbang-examples. It has a global
> deadLetterChannel to direct:parked and a global
> onException(IllegalStateException) that also sends to direct:parked. Route
> checkout (file:orders) calls direct:charge, which is route payment-provider
> with noErrorHandler. Route parked writes the order to file:parked. When the
> payment provider fails, the failure goes back to checkout, whose error
> handler sends the order to parked.
> What the diagram draws today:
> {noformat}
> file:orders -> [checkout] --> [payment-provider] --> > Utility (loop arrow
> on itself)
> (parked, collapsed)
> {noformat}
> It says payment-provider calls parked and parked calls itself; neither is
> true. The JSON topology does not list parked or its edges at all.
> What it should draw:
> {noformat}
> file:orders -> +----------+ call +------------------+
> | checkout |-------->| payment-provider |
> +----+-----+ +------------------+
> : on failure: dead letter (2 retries),
> : onException IllegalStateException
> v
> +----------+
> | parked |--> file:parked
> +----------+
> {noformat}
> * error paths drawn dashed and labelled (on failure: dead letter /
> onException), from the route whose error handler acts: here checkout, as
> payment-provider has noErrorHandler and its failure goes back to its caller
> * parked drawn as a normal route, not a collapsed Utility box
> * the JSON topology lists parked and the edge with kind onError, so a tool or
> an agent sees the same picture
> The link model already marks a link as on error when every send to it handles
> a failure, so much of this is drawing. Still to find out: why the edge comes
> out of payment-provider and why parked gets a loop (likely the global error
> handler's send to direct:parked is attached to every route, parked itself
> included).
> The same may be needed in camel-diagram and the route/topology dev consoles,
> which draw or report the route graph too.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)