[
https://issues.apache.org/jira/browse/CAMEL-22907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruno Gonçalves updated CAMEL-22907:
------------------------------------
Description:
*Description:*
We have identified a behavior in Apache Camel that does not match the expected
error propagation when using consumers with {{bridgeErrorHandler=true}} and an
error handler configured with {{{}handled=false{}}}.
*Problem:*
When an error occurs in a consumer, the error is sent to the configured error
handler. If the error handler sets {{{}handled=false{}}}, the exchange *does
not continue to a subroute* for further processing, unlike other error
scenarios.
*Impact:*
* The exchange is marked as failed (correct), but processing stops before
reaching configured subroutes.
* This breaks reuse of subroutes for error handling logic and affects
integration flows where error handling needs to occur in a centralized subroute
while keeping the exchange in a failed state.
*Use Case 1 – Error during exchange ({color:#00875a}working{color})*
# Error occurs in route 2.
# Error is sent to error handler with {{{}handled=false{}}}.
# Error is sent further to subroute.
!https://private-user-images.githubusercontent.com/23716892/540454508-c5bc930b-c0d5-403c-8c99-75206d851dac.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzU4OTAsIm5iZiI6MTc2OTQzNTU5MCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ1MDgtYzViYzkzMGItYzBkNS00MDNjLThjOTktNzUyMDZkODUxZGFjLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNTMxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxY2ZmZWIwMmZiMWU5NmMxZGExMjMzOWY3N2M0Y2QyMTA4MjNiMjBmODQzYzBhNzljMzkyMzExZDU0NTBhNjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JnOrINmLJhwJs7NIGTMR3mpKYEBiCeRi7VeRytE416A!
*Use Case 2 – Error in consumer with bridgeErrorHandler=false (working)*
# Error occurs in consumer.
# Error is *not* sent to error handler.
*Use Case 3 – Error in consumer with bridgeErrorHandler=true / handled=true
(working)*
# Error occurs in consumer.
# Error is sent to error handler with {{{}handled=true{}}}.
# Error is sent to subroute.
*Use Case 4 – Error in consumer with bridgeErrorHandler=true / handled=false
(not working)*
# Error occurs in consumer.
# Error is sent to error handler with {{{}handled=false{}}}.
# *Error is not sent to subroute* (unexpected).
*Expected Behavior:*
* In Use Case 4, the exchange should reach the subroute, similar to Use Case
1, while keeping the exchange in a failed state.
*Observed Behavior:*
* Exchange does not continue to the subroute.
* Exchange remains in failed state but bypasses the subroute.
was:
*Description:*
We have identified a behavior in Apache Camel that does not match the expected
error propagation when using consumers with {{bridgeErrorHandler=true}} and an
error handler configured with {{{}handled=false{}}}.
*Problem:*
When an error occurs in a consumer, the error is sent to the configured error
handler. If the error handler sets {{{}handled=false{}}}, the exchange *does
not continue to a subroute* for further processing, unlike other error
scenarios.
*Impact:*
* The exchange is marked as failed (correct), but processing stops before
reaching configured subroutes.
* This breaks reuse of subroutes for error handling logic and affects
integration flows where error handling needs to occur in a centralized subroute
while keeping the exchange in a failed state.
*Use Case 1 – Error during exchange (working)*
# Error occurs in route 2.
# Error is sent to error handler with {{{}handled=false{}}}.
# Error is sent further to subroute.
*Use Case 2 – Error in consumer with bridgeErrorHandler=false (working)*
# Error occurs in consumer.
# Error is *not* sent to error handler.
*Use Case 3 – Error in consumer with bridgeErrorHandler=true / handled=true
(working)*
# Error occurs in consumer.
# Error is sent to error handler with {{{}handled=true{}}}.
# Error is sent to subroute.
*Use Case 4 – Error in consumer with bridgeErrorHandler=true / handled=false
(not working)*
# Error occurs in consumer.
# Error is sent to error handler with {{{}handled=false{}}}.
# *Error is not sent to subroute* (unexpected).
*Expected Behavior:*
* In Use Case 4, the exchange should reach the subroute, similar to Use Case
1, while keeping the exchange in a failed state.
*Observed Behavior:*
* Exchange does not continue to the subroute.
* Exchange remains in failed state but bypasses the subroute.
> Consumer errors with bridgeErrorHandler=true and handled=false do not
> propagate to subroutes
> --------------------------------------------------------------------------------------------
>
> Key: CAMEL-22907
> URL: https://issues.apache.org/jira/browse/CAMEL-22907
> Project: Camel
> Issue Type: Bug
> Affects Versions: 4.10.8
> Environment: *Use Case 1 – Error during exchange
> ({color:#00875a}working{color})*
> # Error occurs in route 2.
> # Error is sent to error handler with {{{}handled=false{}}}.
> # Error is sent further to subroute.
> !https://private-user-images.githubusercontent.com/23716892/540454508-c5bc930b-c0d5-403c-8c99-75206d851dac.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzUzMDgsIm5iZiI6MTc2OTQzNTAwOCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ1MDgtYzViYzkzMGItYzBkNS00MDNjLThjOTktNzUyMDZkODUxZGFjLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNDMyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4NTc0ZTI0ZjA1MzFlOTg5OTkxODFlMzVmZDU3OGE3YjYwZWRiNDYxODNiZTdmOWEzZTFmNThiZDc0NmU5ODMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9oSvYk6Is0EFDIDbAJ1mpZu_jBZGff8dCQ-duA4NCFs!
> *Use Case 2 – Error in consumer with bridgeErrorHandler=false
> ({color:#00875a}working{color})*
> # Error occurs in consumer.
> # Error is *not* sent to error handler.
> !https://private-user-images.githubusercontent.com/23716892/540448876-38a87259-ce18-49a5-875e-7acf3dd82ddd.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzUzMDgsIm5iZiI6MTc2OTQzNTAwOCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NDg4NzYtMzhhODcyNTktY2UxOC00OWE1LTg3NWUtN2FjZjNkZDgyZGRkLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNDMyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBiYjA3MDE5ODk4YWY3ZjNhMTE2M2M2NjgxOTZmZWZhNjE3NjhjZGI3ZGY2MDBiYTQ4ZDEyZTY2YzkxNjdiZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.afVuU0OtJlBgi2V2VG_yK_wK5xk9RYUEvXDeOvbXUe8!
> *Use Case 3 – Error in consumer with bridgeErrorHandler=true / handled=true
> ({color:#00875a}working{color})*
> # Error occurs in consumer.
> # Error is sent to error handler with {{{}handled=true{}}}.
> # Error is sent to subroute.
> !https://private-user-images.githubusercontent.com/23716892/540454615-c5e09bf4-dd25-4fd4-9ac1-5779d4484448.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzUzMDgsIm5iZiI6MTc2OTQzNTAwOCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ2MTUtYzVlMDliZjQtZGQyNS00ZmQ0LTlhYzEtNTc3OWQ0NDg0NDQ4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNDMyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkYzEzMGVhY2RmMTE2MDliYWI3NmRjYjBiZjhlMDk3MTk2NzhhMGYxZjVhOTlkOWVjMGY5MTExNGM0ZGI5ZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.T8E3OjOpn0yOiugDRzt35UYGYKif2o7Ylb7j4lGoJaQ!
> *Use Case 4 – Error in consumer with bridgeErrorHandler=true / handled=false
> ({color:#de350b}not working{color})*
> # Error occurs in consumer.
> # Error is sent to error handler with {{{}handled=false{}}}.
> # *Error is not sent to subroute* (unexpected).
> !https://private-user-images.githubusercontent.com/23716892/540454810-d299e460-228b-49dd-9d97-e7bb6ad5d74e.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzUzMDgsIm5iZiI6MTc2OTQzNTAwOCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ4MTAtZDI5OWU0NjAtMjI4Yi00OWRkLTlkOTctZTdiYjZhZDVkNzRlLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNDMyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkwNjUwMzA2MGQ0YjFmNmViODViOTQyZmI5ZjI5NGUzNGNmMWEyYjdhMjQwNDE5OTBmYTE0ZTdiOGRhNTEyYzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xi2_gtDlVkuIMzmQVN7pzPrWhYOHlgxv4z-tlaviaig!
> *Expected Behavior:*
> * In Use Case 4, the exchange should reach the subroute, similar to Use Case
> 1, while keeping the exchange in a failed state.
> !https://private-user-images.githubusercontent.com/23716892/540454927-35f4aac5-b048-459f-b69a-a01030c153de.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzUzMDgsIm5iZiI6MTc2OTQzNTAwOCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ5MjctMzVmNGFhYzUtYjA0OC00NTlmLWI2OWEtYTAxMDMwYzE1M2RlLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNDMyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlMTA0OGM3YTI2YmJiOTkxMjZiYjkwZjE0Y2ExNzgyMzQ2ZDhhM2E3YWFiZTkzNTgwNjM3ZjkxMGNhMjFmNWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9403jtKnuApPrBYiqNnms6O292wQ8do65ctAZdyLvkU!
> *Observed Behavior:*
> * Exchange does not continue to the subroute.
> * Exchange remains in failed state but bypasses the subroute.
> Reporter: Bruno Gonçalves
> Priority: Major
>
> *Description:*
> We have identified a behavior in Apache Camel that does not match the
> expected error propagation when using consumers with
> {{bridgeErrorHandler=true}} and an error handler configured with
> {{{}handled=false{}}}.
> *Problem:*
> When an error occurs in a consumer, the error is sent to the configured error
> handler. If the error handler sets {{{}handled=false{}}}, the exchange *does
> not continue to a subroute* for further processing, unlike other error
> scenarios.
> *Impact:*
> * The exchange is marked as failed (correct), but processing stops before
> reaching configured subroutes.
> * This breaks reuse of subroutes for error handling logic and affects
> integration flows where error handling needs to occur in a centralized
> subroute while keeping the exchange in a failed state.
> *Use Case 1 – Error during exchange ({color:#00875a}working{color})*
> # Error occurs in route 2.
> # Error is sent to error handler with {{{}handled=false{}}}.
> # Error is sent further to subroute.
> !https://private-user-images.githubusercontent.com/23716892/540454508-c5bc930b-c0d5-403c-8c99-75206d851dac.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzU4OTAsIm5iZiI6MTc2OTQzNTU5MCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ1MDgtYzViYzkzMGItYzBkNS00MDNjLThjOTktNzUyMDZkODUxZGFjLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNTMxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxY2ZmZWIwMmZiMWU5NmMxZGExMjMzOWY3N2M0Y2QyMTA4MjNiMjBmODQzYzBhNzljMzkyMzExZDU0NTBhNjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JnOrINmLJhwJs7NIGTMR3mpKYEBiCeRi7VeRytE416A!
> *Use Case 2 – Error in consumer with bridgeErrorHandler=false (working)*
> # Error occurs in consumer.
> # Error is *not* sent to error handler.
> *Use Case 3 – Error in consumer with bridgeErrorHandler=true / handled=true
> (working)*
> # Error occurs in consumer.
> # Error is sent to error handler with {{{}handled=true{}}}.
> # Error is sent to subroute.
> *Use Case 4 – Error in consumer with bridgeErrorHandler=true / handled=false
> (not working)*
> # Error occurs in consumer.
> # Error is sent to error handler with {{{}handled=false{}}}.
> # *Error is not sent to subroute* (unexpected).
> *Expected Behavior:*
> * In Use Case 4, the exchange should reach the subroute, similar to Use Case
> 1, while keeping the exchange in a failed state.
> *Observed Behavior:*
> * Exchange does not continue to the subroute.
> * Exchange remains in failed state but bypasses the subroute.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)