camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-1260) should we use endpoints for errors thrown by things like ScheduledPollConsumer - so folks can choose to log them, route them, or just ignore them
Date Wed, 18 Apr 2012 14:51:37 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256615#comment-13256615
] 

Claus Ibsen commented on CAMEL-1260:
------------------------------------

I got a solution that will work with most consumers. Current requirement would be the consumer
should extends DefaultConsumer. We could introduce an interface to allow any component write
to implement the interface for his consumer to bridge this.

For a file endpoint you can now do
{code}
  from("file:target/nospace?consumer.bridgeErrorHandler=true")
    .to(...)
    ...
{code}

Notice the {{consumer.bridgeErrorHandler=true}} option that will bridge the consumer exception
handler with the Camel routing error handler.
                
> should we use endpoints for errors thrown by things like ScheduledPollConsumer - so folks
can choose to log them, route them, or just ignore them
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1260
>                 URL: https://issues.apache.org/jira/browse/CAMEL-1260
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: james strachan
>            Assignee: Claus Ibsen
>             Fix For: Future
>
>
> I wonder if a more flexible fix to CAMEL-501 is to send errors to a configured endpoint
URI - then folks can choose to route them wherever they like (to a log, ignore them, throw
them on shutdown etc).
> e.g. rather than log the exception, send the exception as a message to some error endpoint
like error:ScheduledPollConsumer. Folks could then 
> * override the URI to send errors to in the ScheduledPollConsumer
> * create a route 
> {code}
> from("error:ScheduledPollConsumer").to("log:Foo");
> {code}
> * the default behaviour for any error endpoint could maybe be - if there are no consumers
defined, we log to the error console?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message