Bruno Gonçalves created CAMEL-22820:
---------------------------------------

             Summary: routeConfiguration onException does not propagate to 
direct endpoints for consumer-level exceptions
                 Key: CAMEL-22820
                 URL: https://issues.apache.org/jira/browse/CAMEL-22820
             Project: Camel
          Issue Type: Bug
          Components: camel-ftp, camel-mail
    Affects Versions: 4.10.8, 4.10.9
         Environment: Apache Camel *4.10.8,* *4.10.9-SNAPSHOT*
            Reporter: Bruno Gonçalves
         Attachments: error-handler-reproducer.zip

When using {{routeConfiguration}} with {{onException}} in Java DSL, 
consumer-level exceptions (e.g. IMAP authentication failures) are only 
{*}partially handled{*}: processors like {{log:}} are executed, but routing to 
endpoints such as {{direct:}} does not occur.

The same configuration *works as expected* when {{onException}} is declared 
directly in a {{{}RouteBuilder{}}}, but {*}fails when moved to 
{{RouteConfigurationBuilder}}{*}, even though the route references the 
configuration via {{{}routeConfigurationId{}}}.



A *reproducer is attached* which contains {*}two cases{*}:
 # *Using {{routeConfiguration}}*

 ** {{onException}} is triggered

 ** {{log:}} endpoint is executed

 ** {{direct:}} endpoints are *not invoked*

 # *Using inline {{onException}} in {{RouteBuilder}}*

 ** Full error handling works as expected

 ** {{direct:}} routes are invoked correctly



This behavior has been observed not only with {*}IMAP inbound consumers{*}, but 
also with {*}FTP inbound consumers{*}, suggesting the issue is *not specific to 
the Mail component* and may affect other polling or consumer-based endpoints as 
well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to