[
https://issues.apache.org/jira/browse/CAMEL-23050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18061220#comment-18061220
]
Raymond commented on CAMEL-23050:
---------------------------------
OK, thanks for the explanation. I indeed thought that LastError was about
exchange failures. I originally (years ago) developed something the logged
failed exchanges to disk using a failure processor. However, this wasn't ideal,
so I looked into the framework to see what is possible today.
The thing is a bit that originally ESB's saw each message, including failures,
as an atomic thing. For example by sending messages to a deadletter queue.
However, in practice most users would like to have more bread insight:
1. How many messages fail?
2. Where do they fail?
3. What is the failure? What is the message content? What endpoint/route is
involved?
4. Why do they fail?
The answers to these questions give insight, analytics, patterns, and
possibilities to take actions. In my view the atomic approach on error handling
and managed by exception is too limited nowadays. Observability gives a broader
overview, but is often to superficial, because it only tracks metrics.
> Add getLastHandledError to ManagedRouteMBean and ManagedRouteGroupMBean API
> ---------------------------------------------------------------------------
>
> Key: CAMEL-23050
> URL: https://issues.apache.org/jira/browse/CAMEL-23050
> Project: Camel
> Issue Type: Improvement
> Reporter: Raymond
> Priority: Minor
>
> This issue is related to this issue:
> https://issues.apache.org/jira/browse/CAMEL-23049
> Currently, you only get the unhandled last error. I would like to get the
> last *handled* error (on route and group level) instead.
> *Note:* An additional thought, would it be practical if there is a general
> "Error Registry" or "Error Factory" that automatically stores and indexes
> failed exchanges for later querying?
> I can then have some fluent API (like a FluentProducer) to query. Examples
> (pseudo-code):
> {code:java}
> //get last 10 failures that are handled of route 123
> errorRegistry
> .last(10)
> .handled(true)
> .routeId("123")
> //get last 3 failures that are unhandled of endpoint ftp:myServer
> errorRegistry
> .last(3)
> .handled(false)
> .endpoint("ftp:myServer")
> //get last unhandled failure of group OrderIntegration
> errorRegistry
> .group("orderIntegration") {code}
> This then could give back a map with RouteID and RouteError object.
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)