This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a090e27eb02aeeeb9b698401b23882b98e156609
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Oct 24 20:26:47 2026 +0200

    CAMEL-26064: camel-as2 - add the muteException option to the server and 
receipt consumers, true by default (#28331)
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../org/apache/camel/catalog/components/as2.json   | 53 +++++++++++-----------
 .../apache/camel/catalog/docs/as2-component.adoc   |  3 +-
 ...rverManagerEndpointConfigurationConfigurer.java |  7 +++
 ...ientManagerEndpointConfigurationConfigurer.java |  7 +++
 .../component/as2/AS2ConfigurationConfigurer.java  |  7 +++
 .../camel/component/as2/AS2EndpointConfigurer.java |  7 +++
 .../camel/component/as2/AS2EndpointUriFactory.java |  3 +-
 ...rverManagerEndpointConfigurationConfigurer.java |  7 +++
 .../org/apache/camel/component/as2/as2.json        | 53 +++++++++++-----------
 .../src/main/docs/as2-component.adoc               |  3 +-
 .../camel/component/as2/AS2AsyncMDNConsumer.java   |  5 +-
 .../camel/component/as2/AS2Configuration.java      | 14 ++++++
 .../apache/camel/component/as2/AS2Consumer.java    |  5 +-
 .../camel/component/as2/AS2ServerManagerIT.java    | 15 ++++--
 .../component/as2/AS2ServerManagerITBase.java      |  5 ++
 .../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc    |  7 +++
 .../endpoint/dsl/AS2EndpointBuilderFactory.java    | 36 +++++++++++++++
 17 files changed, 177 insertions(+), 60 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
index fb3b9aba7457..7cf976ca0b68 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
@@ -68,32 +68,33 @@
     "targetHostname": { "index": 27, "kind": "parameter", "displayName": 
"Target Hostname", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The host name (IP or DNS name) of target 
host." },
     "targetPortNumber": { "index": 28, "kind": "parameter", "displayName": 
"Target Port Number", "group": "common", "label": "", "required": false, 
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 80, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The port number of target host. -1 indicates 
the scheme default port." },
     "userAgent": { "index": 29, "kind": "parameter", "displayName": "User 
Agent", "group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "Camel AS2 Client Endpoint", 
"configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "The value included in 
the User-Agent message header identifying the AS2 user a [...]
-    "exceptionHandler": { "index": 30, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By de [...]
-    "exchangePattern": { "index": 31, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "enum", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
-    "expectContinue": { "index": 32, "kind": "parameter", "displayName": 
"Expect Continue", "group": "producer", "label": "producer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Controls whether the Expect: 100-Continue 
header is included in outbound AS2 messages. W [...]
-    "lazyStartProducer": { "index": 33, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produ [...]
-    "proxyAuthPassword": { "index": 34, "kind": "parameter", "displayName": 
"Proxy Auth Password", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password for basic authentication with the 
HTTP proxy." },
-    "proxyAuthUsername": { "index": 35, "kind": "parameter", "displayName": 
"Proxy Auth Username", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user name for basic authentication with 
the HTTP proxy. The credenti [...]
-    "proxyHost": { "index": 36, "kind": "parameter", "displayName": "Proxy 
Host", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The host name of an HTTP proxy the client 
sends its AS2 messages through. The connection to the proxy is plain [...]
-    "proxyPort": { "index": 37, "kind": "parameter", "displayName": "Proxy 
Port", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The port number of the HTTP proxy." },
-    "accessToken": { "index": 38, "kind": "parameter", "displayName": "Access 
Token", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the client 
for bearer authentication." },
-    "asyncMdnAllowedHosts": { "index": 39, "kind": "parameter", "displayName": 
"Async Mdn Allowed Hosts", "group": "security", "label": "security", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Comma separated list of host names an 
asynchronous MDN may be delivered to. The delivery  [...]
-    "decryptingPrivateKey": { "index": 40, "kind": "parameter", "displayName": 
"Decrypting Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to encrypt the EDI message." },
-    "encryptingAlgorithm": { "index": 41, "kind": "parameter", "displayName": 
"Encrypting Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ 
"AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", 
"AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", 
"CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", 
"GOST28 [...]
-    "encryptingCertificateChain": { "index": 42, "kind": "parameter", 
"displayName": "Encrypting Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to encrypt EDI 
message." },
-    "hostnameVerifier": { "index": 43, "kind": "parameter", "displayName": 
"Hostname Verifier", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set hostname verifier for SSL session." },
-    "mdnAccessToken": { "index": 44, "kind": "parameter", "displayName": "Mdn 
Access Token", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the server 
when it sends an async MDN. The optio [...]
-    "mdnPassword": { "index": 45, "kind": "parameter", "displayName": "Mdn 
Password", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the server for 
basic authentication when it sends an async  [...]
-    "mdnUserName": { "index": 46, "kind": "parameter", "displayName": "Mdn 
User Name", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the server for 
basic authentication when it sends an asyn [...]
-    "password": { "index": 47, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the client for 
basic authentication." },
-    "signatureVerificationRequired": { "index": 48, "kind": "parameter", 
"displayName": "Signature Verification Required", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "Whether to reject an 
inbound signed AS2 message that cann [...]
-    "signedReceiptMicAlgorithms": { "index": 49, "kind": "parameter", 
"displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": 
"security", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "The list of algorithms, 
in order of preference, requested to generate a messa [...]
-    "signingAlgorithm": { "index": 50, "kind": "parameter", "displayName": 
"Signing Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ 
"SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", 
"MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", 
"SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", 
"RIPEMD256 [...]
-    "signingCertificateChain": { "index": 51, "kind": "parameter", 
"displayName": "Signing Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to sign EDI 
message." },
-    "signingPrivateKey": { "index": 52, "kind": "parameter", "displayName": 
"Signing Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to sign the EDI message." },
-    "sslContext": { "index": 53, "kind": "parameter", "displayName": "Ssl 
Context", "group": "security", "label": "security", "required": false, "type": 
"object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set SSL context for connection to remote 
server." },
-    "userName": { "index": 54, "kind": "parameter", "displayName": "User 
Name", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the client for 
basic authentication. If options for basic authen [...]
-    "validateSigningCertificateChain": { "index": 55, "kind": "parameter", 
"displayName": "Validate Signing Certificate Chain", "group": "security", 
"label": "security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Certificates to validate the message's 
signature ag [...]
+    "muteException": { "index": 30, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "If enabled and an Exchange failed processing 
on the consumer side (server listen or receipt [...]
+    "exceptionHandler": { "index": 31, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By de [...]
+    "exchangePattern": { "index": 32, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "enum", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
+    "expectContinue": { "index": 33, "kind": "parameter", "displayName": 
"Expect Continue", "group": "producer", "label": "producer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Controls whether the Expect: 100-Continue 
header is included in outbound AS2 messages. W [...]
+    "lazyStartProducer": { "index": 34, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produ [...]
+    "proxyAuthPassword": { "index": 35, "kind": "parameter", "displayName": 
"Proxy Auth Password", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password for basic authentication with the 
HTTP proxy." },
+    "proxyAuthUsername": { "index": 36, "kind": "parameter", "displayName": 
"Proxy Auth Username", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user name for basic authentication with 
the HTTP proxy. The credenti [...]
+    "proxyHost": { "index": 37, "kind": "parameter", "displayName": "Proxy 
Host", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The host name of an HTTP proxy the client 
sends its AS2 messages through. The connection to the proxy is plain [...]
+    "proxyPort": { "index": 38, "kind": "parameter", "displayName": "Proxy 
Port", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The port number of the HTTP proxy." },
+    "accessToken": { "index": 39, "kind": "parameter", "displayName": "Access 
Token", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the client 
for bearer authentication." },
+    "asyncMdnAllowedHosts": { "index": 40, "kind": "parameter", "displayName": 
"Async Mdn Allowed Hosts", "group": "security", "label": "security", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Comma separated list of host names an 
asynchronous MDN may be delivered to. The delivery  [...]
+    "decryptingPrivateKey": { "index": 41, "kind": "parameter", "displayName": 
"Decrypting Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to encrypt the EDI message." },
+    "encryptingAlgorithm": { "index": 42, "kind": "parameter", "displayName": 
"Encrypting Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ 
"AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", 
"AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", 
"CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", 
"GOST28 [...]
+    "encryptingCertificateChain": { "index": 43, "kind": "parameter", 
"displayName": "Encrypting Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to encrypt EDI 
message." },
+    "hostnameVerifier": { "index": 44, "kind": "parameter", "displayName": 
"Hostname Verifier", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set hostname verifier for SSL session." },
+    "mdnAccessToken": { "index": 45, "kind": "parameter", "displayName": "Mdn 
Access Token", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the server 
when it sends an async MDN. The optio [...]
+    "mdnPassword": { "index": 46, "kind": "parameter", "displayName": "Mdn 
Password", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the server for 
basic authentication when it sends an async  [...]
+    "mdnUserName": { "index": 47, "kind": "parameter", "displayName": "Mdn 
User Name", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the server for 
basic authentication when it sends an asyn [...]
+    "password": { "index": 48, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the client for 
basic authentication." },
+    "signatureVerificationRequired": { "index": 49, "kind": "parameter", 
"displayName": "Signature Verification Required", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "Whether to reject an 
inbound signed AS2 message that cann [...]
+    "signedReceiptMicAlgorithms": { "index": 50, "kind": "parameter", 
"displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": 
"security", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "The list of algorithms, 
in order of preference, requested to generate a messa [...]
+    "signingAlgorithm": { "index": 51, "kind": "parameter", "displayName": 
"Signing Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ 
"SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", 
"MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", 
"SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", 
"RIPEMD256 [...]
+    "signingCertificateChain": { "index": 52, "kind": "parameter", 
"displayName": "Signing Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to sign EDI 
message." },
+    "signingPrivateKey": { "index": 53, "kind": "parameter", "displayName": 
"Signing Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to sign the EDI message." },
+    "sslContext": { "index": 54, "kind": "parameter", "displayName": "Ssl 
Context", "group": "security", "label": "security", "required": false, "type": 
"object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set SSL context for connection to remote 
server." },
+    "userName": { "index": 55, "kind": "parameter", "displayName": "User 
Name", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the client for 
basic authentication. If options for basic authen [...]
+    "validateSigningCertificateChain": { "index": 56, "kind": "parameter", 
"displayName": "Validate Signing Certificate Chain", "group": "security", 
"label": "security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Certificates to validate the message's 
signature ag [...]
   },
   "apis": {
     "client": { "consumerOnly": false, "producerOnly": true, "description": 
"Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send 
ediMessage to trading partner", "signatures": [ 
"org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, 
String requestUri, String subject, String from, String as2From, String as2To, 
org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, 
String ediMessageContentType, String ediMessageCharset, String  [...]
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc
index 0792320f70cc..ac86a695af16 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc
@@ -60,7 +60,8 @@ override the API call. See 
xref:manual::security-model.adoc[the Camel security m
 == Usage
 
 An `as2://server/listen` consumer receives AS2 messages on `serverPortNumber`, 
for the request URIs that match
-`requestUriPattern`. An `as2://client/send` producer sends the message body 
(`inBody: ediMessage`) to
+`requestUriPattern`. When its route fails, the partner gets an HTTP 500 that 
only says the message could not be
+processed; set `muteException=false` to send the message of the exception too. 
An `as2://client/send` producer sends the message body (`inBody: ediMessage`) to
 `targetHostname` and `targetPortNumber`. The following routes send a plain 
EDIFACT message from one to the other:
 
 [source,yaml]
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
index 2ec8edb4920e..2398b08f1e0c 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
+++ 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
@@ -52,6 +52,7 @@ public class 
AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
         map.put("MdnPassword", java.lang.String.class);
         map.put("MdnUserName", java.lang.String.class);
         map.put("MethodName", java.lang.String.class);
+        map.put("MuteException", boolean.class);
         map.put("Password", java.lang.String.class);
         map.put("ProxyAuthPassword", java.lang.String.class);
         map.put("ProxyAuthUsername", java.lang.String.class);
@@ -141,6 +142,8 @@ public class 
AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
         case "mdnUserName": target.setMdnUserName(property(camelContext, 
java.lang.String.class, value)); return true;
         case "methodname":
         case "methodName": target.setMethodName(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "muteexception":
+        case "muteException": target.setMuteException(property(camelContext, 
boolean.class, value)); return true;
         case "password": target.setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyauthpassword":
         case "proxyAuthPassword": 
target.setProxyAuthPassword(property(camelContext, java.lang.String.class, 
value)); return true;
@@ -255,6 +258,8 @@ public class 
AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
         case "mdnUserName": return java.lang.String.class;
         case "methodname":
         case "methodName": return java.lang.String.class;
+        case "muteexception":
+        case "muteException": return boolean.class;
         case "password": return java.lang.String.class;
         case "proxyauthpassword":
         case "proxyAuthPassword": return java.lang.String.class;
@@ -365,6 +370,8 @@ public class 
AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
         case "mdnUserName": return target.getMdnUserName();
         case "methodname":
         case "methodName": return target.getMethodName();
+        case "muteexception":
+        case "muteException": return target.isMuteException();
         case "password": return target.getPassword();
         case "proxyauthpassword":
         case "proxyAuthPassword": return target.getProxyAuthPassword();
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
index 395cb3eca76d..4087f9d2c540 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
+++ 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
@@ -54,6 +54,7 @@ public class AS2ClientManagerEndpointConfigurationConfigurer 
extends org.apache.
         map.put("MdnPassword", java.lang.String.class);
         map.put("MdnUserName", java.lang.String.class);
         map.put("MethodName", java.lang.String.class);
+        map.put("MuteException", boolean.class);
         map.put("Password", java.lang.String.class);
         map.put("ProxyAuthPassword", java.lang.String.class);
         map.put("ProxyAuthUsername", java.lang.String.class);
@@ -146,6 +147,8 @@ public class 
AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
         case "mdnUserName": target.setMdnUserName(property(camelContext, 
java.lang.String.class, value)); return true;
         case "methodname":
         case "methodName": target.setMethodName(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "muteexception":
+        case "muteException": target.setMuteException(property(camelContext, 
boolean.class, value)); return true;
         case "password": target.setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyauthpassword":
         case "proxyAuthPassword": 
target.setProxyAuthPassword(property(camelContext, java.lang.String.class, 
value)); return true;
@@ -262,6 +265,8 @@ public class 
AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
         case "mdnUserName": return java.lang.String.class;
         case "methodname":
         case "methodName": return java.lang.String.class;
+        case "muteexception":
+        case "muteException": return boolean.class;
         case "password": return java.lang.String.class;
         case "proxyauthpassword":
         case "proxyAuthPassword": return java.lang.String.class;
@@ -374,6 +379,8 @@ public class 
AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
         case "mdnUserName": return target.getMdnUserName();
         case "methodname":
         case "methodName": return target.getMethodName();
+        case "muteexception":
+        case "muteException": return target.isMuteException();
         case "password": return target.getPassword();
         case "proxyauthpassword":
         case "proxyAuthPassword": return target.getProxyAuthPassword();
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
index 135bbbe25b06..5df37c0db5ef 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
+++ 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
@@ -52,6 +52,7 @@ public class AS2ConfigurationConfigurer extends 
org.apache.camel.support.compone
         map.put("MdnPassword", java.lang.String.class);
         map.put("MdnUserName", java.lang.String.class);
         map.put("MethodName", java.lang.String.class);
+        map.put("MuteException", boolean.class);
         map.put("Password", java.lang.String.class);
         map.put("ProxyAuthPassword", java.lang.String.class);
         map.put("ProxyAuthUsername", java.lang.String.class);
@@ -140,6 +141,8 @@ public class AS2ConfigurationConfigurer extends 
org.apache.camel.support.compone
         case "mdnUserName": target.setMdnUserName(property(camelContext, 
java.lang.String.class, value)); return true;
         case "methodname":
         case "methodName": target.setMethodName(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "muteexception":
+        case "muteException": target.setMuteException(property(camelContext, 
boolean.class, value)); return true;
         case "password": target.setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyauthpassword":
         case "proxyAuthPassword": 
target.setProxyAuthPassword(property(camelContext, java.lang.String.class, 
value)); return true;
@@ -252,6 +255,8 @@ public class AS2ConfigurationConfigurer extends 
org.apache.camel.support.compone
         case "mdnUserName": return java.lang.String.class;
         case "methodname":
         case "methodName": return java.lang.String.class;
+        case "muteexception":
+        case "muteException": return boolean.class;
         case "password": return java.lang.String.class;
         case "proxyauthpassword":
         case "proxyAuthPassword": return java.lang.String.class;
@@ -360,6 +365,8 @@ public class AS2ConfigurationConfigurer extends 
org.apache.camel.support.compone
         case "mdnUserName": return target.getMdnUserName();
         case "methodname":
         case "methodName": return target.getMethodName();
+        case "muteexception":
+        case "muteException": return target.isMuteException();
         case "password": return target.getPassword();
         case "proxyauthpassword":
         case "proxyAuthPassword": return target.getProxyAuthPassword();
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
index 50f3fc057ef5..fe194c7c82a5 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
+++ 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
@@ -52,6 +52,7 @@ public class AS2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         map.put("TargetHostname", java.lang.String.class);
         map.put("TargetPortNumber", java.lang.Integer.class);
         map.put("UserAgent", java.lang.String.class);
+        map.put("MuteException", boolean.class);
         map.put("ExceptionHandler", 
org.apache.camel.spi.ExceptionHandler.class);
         map.put("ExchangePattern", org.apache.camel.ExchangePattern.class);
         map.put("ExpectContinue", boolean.class);
@@ -148,6 +149,8 @@ public class AS2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "mdnPassword": 
target.getConfiguration().setMdnPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "mdnusername":
         case "mdnUserName": 
target.getConfiguration().setMdnUserName(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "muteexception":
+        case "muteException": 
target.getConfiguration().setMuteException(property(camelContext, 
boolean.class, value)); return true;
         case "password": 
target.getConfiguration().setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyauthpassword":
         case "proxyAuthPassword": 
target.getConfiguration().setProxyAuthPassword(property(camelContext, 
java.lang.String.class, value)); return true;
@@ -264,6 +267,8 @@ public class AS2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "mdnPassword": return java.lang.String.class;
         case "mdnusername":
         case "mdnUserName": return java.lang.String.class;
+        case "muteexception":
+        case "muteException": return boolean.class;
         case "password": return java.lang.String.class;
         case "proxyauthpassword":
         case "proxyAuthPassword": return java.lang.String.class;
@@ -376,6 +381,8 @@ public class AS2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "mdnPassword": return target.getConfiguration().getMdnPassword();
         case "mdnusername":
         case "mdnUserName": return target.getConfiguration().getMdnUserName();
+        case "muteexception":
+        case "muteException": return 
target.getConfiguration().isMuteException();
         case "password": return target.getConfiguration().getPassword();
         case "proxyauthpassword":
         case "proxyAuthPassword": return 
target.getConfiguration().getProxyAuthPassword();
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
index bbf65d808ee4..84f8bc97ef66 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
+++ 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
@@ -24,7 +24,7 @@ public class AS2EndpointUriFactory extends 
org.apache.camel.support.component.En
     private static final Set<String> ENDPOINT_IDENTITY_PROPERTY_NAMES;
     private static final Map<String, String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(59);
+        Set<String> props = new HashSet<>(60);
         props.add("accessToken");
         props.add("apiName");
         props.add("as2From");
@@ -61,6 +61,7 @@ public class AS2EndpointUriFactory extends 
org.apache.camel.support.component.En
         props.add("mdnPassword");
         props.add("mdnUserName");
         props.add("methodName");
+        props.add("muteException");
         props.add("password");
         props.add("proxyAuthPassword");
         props.add("proxyAuthUsername");
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
index d8a55e239a3b..a22927713703 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
+++ 
b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
@@ -52,6 +52,7 @@ public class AS2ServerManagerEndpointConfigurationConfigurer 
extends org.apache.
         map.put("MdnPassword", java.lang.String.class);
         map.put("MdnUserName", java.lang.String.class);
         map.put("MethodName", java.lang.String.class);
+        map.put("MuteException", boolean.class);
         map.put("Password", java.lang.String.class);
         map.put("ProxyAuthPassword", java.lang.String.class);
         map.put("ProxyAuthUsername", java.lang.String.class);
@@ -141,6 +142,8 @@ public class 
AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
         case "mdnUserName": target.setMdnUserName(property(camelContext, 
java.lang.String.class, value)); return true;
         case "methodname":
         case "methodName": target.setMethodName(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "muteexception":
+        case "muteException": target.setMuteException(property(camelContext, 
boolean.class, value)); return true;
         case "password": target.setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyauthpassword":
         case "proxyAuthPassword": 
target.setProxyAuthPassword(property(camelContext, java.lang.String.class, 
value)); return true;
@@ -255,6 +258,8 @@ public class 
AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
         case "mdnUserName": return java.lang.String.class;
         case "methodname":
         case "methodName": return java.lang.String.class;
+        case "muteexception":
+        case "muteException": return boolean.class;
         case "password": return java.lang.String.class;
         case "proxyauthpassword":
         case "proxyAuthPassword": return java.lang.String.class;
@@ -365,6 +370,8 @@ public class 
AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
         case "mdnUserName": return target.getMdnUserName();
         case "methodname":
         case "methodName": return target.getMethodName();
+        case "muteexception":
+        case "muteException": return target.isMuteException();
         case "password": return target.getPassword();
         case "proxyauthpassword":
         case "proxyAuthPassword": return target.getProxyAuthPassword();
diff --git 
a/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
 
b/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
index fb3b9aba7457..7cf976ca0b68 100644
--- 
a/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
+++ 
b/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
@@ -68,32 +68,33 @@
     "targetHostname": { "index": 27, "kind": "parameter", "displayName": 
"Target Hostname", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The host name (IP or DNS name) of target 
host." },
     "targetPortNumber": { "index": 28, "kind": "parameter", "displayName": 
"Target Port Number", "group": "common", "label": "", "required": false, 
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 80, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The port number of target host. -1 indicates 
the scheme default port." },
     "userAgent": { "index": 29, "kind": "parameter", "displayName": "User 
Agent", "group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "Camel AS2 Client Endpoint", 
"configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "The value included in 
the User-Agent message header identifying the AS2 user a [...]
-    "exceptionHandler": { "index": 30, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By de [...]
-    "exchangePattern": { "index": 31, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "enum", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
-    "expectContinue": { "index": 32, "kind": "parameter", "displayName": 
"Expect Continue", "group": "producer", "label": "producer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Controls whether the Expect: 100-Continue 
header is included in outbound AS2 messages. W [...]
-    "lazyStartProducer": { "index": 33, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produ [...]
-    "proxyAuthPassword": { "index": 34, "kind": "parameter", "displayName": 
"Proxy Auth Password", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password for basic authentication with the 
HTTP proxy." },
-    "proxyAuthUsername": { "index": 35, "kind": "parameter", "displayName": 
"Proxy Auth Username", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user name for basic authentication with 
the HTTP proxy. The credenti [...]
-    "proxyHost": { "index": 36, "kind": "parameter", "displayName": "Proxy 
Host", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The host name of an HTTP proxy the client 
sends its AS2 messages through. The connection to the proxy is plain [...]
-    "proxyPort": { "index": 37, "kind": "parameter", "displayName": "Proxy 
Port", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The port number of the HTTP proxy." },
-    "accessToken": { "index": 38, "kind": "parameter", "displayName": "Access 
Token", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the client 
for bearer authentication." },
-    "asyncMdnAllowedHosts": { "index": 39, "kind": "parameter", "displayName": 
"Async Mdn Allowed Hosts", "group": "security", "label": "security", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Comma separated list of host names an 
asynchronous MDN may be delivered to. The delivery  [...]
-    "decryptingPrivateKey": { "index": 40, "kind": "parameter", "displayName": 
"Decrypting Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to encrypt the EDI message." },
-    "encryptingAlgorithm": { "index": 41, "kind": "parameter", "displayName": 
"Encrypting Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ 
"AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", 
"AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", 
"CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", 
"GOST28 [...]
-    "encryptingCertificateChain": { "index": 42, "kind": "parameter", 
"displayName": "Encrypting Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to encrypt EDI 
message." },
-    "hostnameVerifier": { "index": 43, "kind": "parameter", "displayName": 
"Hostname Verifier", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set hostname verifier for SSL session." },
-    "mdnAccessToken": { "index": 44, "kind": "parameter", "displayName": "Mdn 
Access Token", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the server 
when it sends an async MDN. The optio [...]
-    "mdnPassword": { "index": 45, "kind": "parameter", "displayName": "Mdn 
Password", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the server for 
basic authentication when it sends an async  [...]
-    "mdnUserName": { "index": 46, "kind": "parameter", "displayName": "Mdn 
User Name", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the server for 
basic authentication when it sends an asyn [...]
-    "password": { "index": 47, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the client for 
basic authentication." },
-    "signatureVerificationRequired": { "index": 48, "kind": "parameter", 
"displayName": "Signature Verification Required", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "Whether to reject an 
inbound signed AS2 message that cann [...]
-    "signedReceiptMicAlgorithms": { "index": 49, "kind": "parameter", 
"displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": 
"security", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "The list of algorithms, 
in order of preference, requested to generate a messa [...]
-    "signingAlgorithm": { "index": 50, "kind": "parameter", "displayName": 
"Signing Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ 
"SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", 
"MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", 
"SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", 
"RIPEMD256 [...]
-    "signingCertificateChain": { "index": 51, "kind": "parameter", 
"displayName": "Signing Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to sign EDI 
message." },
-    "signingPrivateKey": { "index": 52, "kind": "parameter", "displayName": 
"Signing Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to sign the EDI message." },
-    "sslContext": { "index": 53, "kind": "parameter", "displayName": "Ssl 
Context", "group": "security", "label": "security", "required": false, "type": 
"object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set SSL context for connection to remote 
server." },
-    "userName": { "index": 54, "kind": "parameter", "displayName": "User 
Name", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the client for 
basic authentication. If options for basic authen [...]
-    "validateSigningCertificateChain": { "index": 55, "kind": "parameter", 
"displayName": "Validate Signing Certificate Chain", "group": "security", 
"label": "security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Certificates to validate the message's 
signature ag [...]
+    "muteException": { "index": 30, "kind": "parameter", "displayName": "Mute 
Exception", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "If enabled and an Exchange failed processing 
on the consumer side (server listen or receipt [...]
+    "exceptionHandler": { "index": 31, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By de [...]
+    "exchangePattern": { "index": 32, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "enum", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
+    "expectContinue": { "index": 33, "kind": "parameter", "displayName": 
"Expect Continue", "group": "producer", "label": "producer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Controls whether the Expect: 100-Continue 
header is included in outbound AS2 messages. W [...]
+    "lazyStartProducer": { "index": 34, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produ [...]
+    "proxyAuthPassword": { "index": 35, "kind": "parameter", "displayName": 
"Proxy Auth Password", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password for basic authentication with the 
HTTP proxy." },
+    "proxyAuthUsername": { "index": 36, "kind": "parameter", "displayName": 
"Proxy Auth Username", "group": "proxy", "label": "producer,proxy", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user name for basic authentication with 
the HTTP proxy. The credenti [...]
+    "proxyHost": { "index": 37, "kind": "parameter", "displayName": "Proxy 
Host", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The host name of an HTTP proxy the client 
sends its AS2 messages through. The connection to the proxy is plain [...]
+    "proxyPort": { "index": 38, "kind": "parameter", "displayName": "Proxy 
Port", "group": "proxy", "label": "producer,proxy", "required": false, "type": 
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The port number of the HTTP proxy." },
+    "accessToken": { "index": 39, "kind": "parameter", "displayName": "Access 
Token", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the client 
for bearer authentication." },
+    "asyncMdnAllowedHosts": { "index": 40, "kind": "parameter", "displayName": 
"Async Mdn Allowed Hosts", "group": "security", "label": "security", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Comma separated list of host names an 
asynchronous MDN may be delivered to. The delivery  [...]
+    "decryptingPrivateKey": { "index": 41, "kind": "parameter", "displayName": 
"Decrypting Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to encrypt the EDI message." },
+    "encryptingAlgorithm": { "index": 42, "kind": "parameter", "displayName": 
"Encrypting Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ 
"AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", 
"AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", 
"CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", 
"GOST28 [...]
+    "encryptingCertificateChain": { "index": 43, "kind": "parameter", 
"displayName": "Encrypting Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to encrypt EDI 
message." },
+    "hostnameVerifier": { "index": 44, "kind": "parameter", "displayName": 
"Hostname Verifier", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set hostname verifier for SSL session." },
+    "mdnAccessToken": { "index": 45, "kind": "parameter", "displayName": "Mdn 
Access Token", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The access token that is used by the server 
when it sends an async MDN. The optio [...]
+    "mdnPassword": { "index": 46, "kind": "parameter", "displayName": "Mdn 
Password", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the server for 
basic authentication when it sends an async  [...]
+    "mdnUserName": { "index": 47, "kind": "parameter", "displayName": "Mdn 
User Name", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the server for 
basic authentication when it sends an asyn [...]
+    "password": { "index": 48, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The password that is used by the client for 
basic authentication." },
+    "signatureVerificationRequired": { "index": 49, "kind": "parameter", 
"displayName": "Signature Verification Required", "group": "security", "label": 
"security", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "Whether to reject an 
inbound signed AS2 message that cann [...]
+    "signedReceiptMicAlgorithms": { "index": 50, "kind": "parameter", 
"displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": 
"security", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.as2.AS2Configuration", 
"configurationField": "configuration", "description": "The list of algorithms, 
in order of preference, requested to generate a messa [...]
+    "signingAlgorithm": { "index": 51, "kind": "parameter", "displayName": 
"Signing Algorithm", "group": "security", "label": "security", "required": 
false, "type": "enum", "javaType": 
"org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ 
"SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", 
"MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", 
"SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", 
"RIPEMD256 [...]
+    "signingCertificateChain": { "index": 52, "kind": "parameter", 
"displayName": "Signing Certificate Chain", "group": "security", "label": 
"security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The chain of certificates used to sign EDI 
message." },
+    "signingPrivateKey": { "index": 53, "kind": "parameter", "displayName": 
"Signing Private Key", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": 
false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The key used to sign the EDI message." },
+    "sslContext": { "index": 54, "kind": "parameter", "displayName": "Ssl 
Context", "group": "security", "label": "security", "required": false, "type": 
"object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Set SSL context for connection to remote 
server." },
+    "userName": { "index": 55, "kind": "parameter", "displayName": "User 
Name", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "security": "secret", "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "The user-name that is used by the client for 
basic authentication. If options for basic authen [...]
+    "validateSigningCertificateChain": { "index": 56, "kind": "parameter", 
"displayName": "Validate Signing Certificate Chain", "group": "security", 
"label": "security", "required": false, "type": "object", "javaType": 
"java.security.cert.Certificate[]", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.as2.AS2Configuration", "configurationField": 
"configuration", "description": "Certificates to validate the message's 
signature ag [...]
   },
   "apis": {
     "client": { "consumerOnly": false, "producerOnly": true, "description": 
"Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send 
ediMessage to trading partner", "signatures": [ 
"org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, 
String requestUri, String subject, String from, String as2From, String as2To, 
org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, 
String ediMessageContentType, String ediMessageCharset, String  [...]
diff --git 
a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc 
b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
index 0792320f70cc..ac86a695af16 100644
--- a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
+++ b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
@@ -60,7 +60,8 @@ override the API call. See 
xref:manual::security-model.adoc[the Camel security m
 == Usage
 
 An `as2://server/listen` consumer receives AS2 messages on `serverPortNumber`, 
for the request URIs that match
-`requestUriPattern`. An `as2://client/send` producer sends the message body 
(`inBody: ediMessage`) to
+`requestUriPattern`. When its route fails, the partner gets an HTTP 500 that 
only says the message could not be
+processed; set `muteException=false` to send the message of the exception too. 
An `as2://client/send` producer sends the message body (`inBody: ediMessage`) to
 `targetHostname` and `targetPortNumber`. The following routes send a plain 
EDIFACT message from one to the other:
 
 [source,yaml]
diff --git 
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2AsyncMDNConsumer.java
 
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2AsyncMDNConsumer.java
index 5fa8818ce22b..fd0163abcdc2 100644
--- 
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2AsyncMDNConsumer.java
+++ 
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2AsyncMDNConsumer.java
@@ -124,7 +124,10 @@ public class AS2AsyncMDNConsumer extends 
AbstractApiConsumer<AS2ApiName, AS2Conf
         }
 
         if (exception != null) {
-            throw new HttpException("Failed to process AS2 receipt: " + 
exception.getMessage(), exception);
+            // the text of the exception is the body of the HTTP 500 that the 
partner gets
+            String text = getEndpoint().getConfiguration().isMuteException()
+                    ? "Failed to process AS2 receipt" : "Failed to process AS2 
receipt: " + exception.getMessage();
+            throw new HttpException(text, exception);
         }
     }
 
diff --git 
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
 
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
index bc9d2673ac66..2e3efd4bf8c2 100644
--- 
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
+++ 
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
@@ -122,6 +122,8 @@ public class AS2Configuration {
     private SSLContext sslContext;
     @UriParam(label = "security")
     private String asyncMdnAllowedHosts;
+    @UriParam(label = "consumer", defaultValue = "true")
+    private boolean muteException = true;
     // If you use localhost-based AS2 server, you don't need to specify a 
hostnameVerifier
     @UriParam(label = "security")
     private HostnameVerifier hostnameVerifier;
@@ -768,4 +770,16 @@ public class AS2Configuration {
     public void setAsyncMdnAllowedHosts(String asyncMdnAllowedHosts) {
         this.asyncMdnAllowedHosts = asyncMdnAllowedHosts;
     }
+
+    public boolean isMuteException() {
+        return muteException;
+    }
+
+    /**
+     * If enabled and an Exchange failed processing on the consumer side 
(server listen or receipt receive), the HTTP
+     * response only says that the message or the receipt could not be 
processed, and not the message of the exception.
+     */
+    public void setMuteException(boolean muteException) {
+        this.muteException = muteException;
+    }
 }
diff --git 
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java
 
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java
index 9a2e8854dba4..3dc6eb85c85d 100644
--- 
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java
+++ 
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java
@@ -167,7 +167,10 @@ public class AS2Consumer extends 
AbstractApiConsumer<AS2ApiName, AS2Configuratio
         }
 
         if (exception != null) {
-            throw new HttpException("Failed to process AS2 message: " + 
exception.getMessage(), exception);
+            // the text of the exception is the body of the HTTP 500 that the 
partner gets
+            String text = getEndpoint().getConfiguration().isMuteException()
+                    ? "Failed to process AS2 message" : "Failed to process AS2 
message: " + exception.getMessage();
+            throw new HttpException(text, exception);
         }
     }
 
diff --git 
a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
 
b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
index 5fa7367d76d1..ef47be008eb6 100644
--- 
a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
+++ 
b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
@@ -568,10 +568,20 @@ public class AS2ServerManagerIT extends 
AS2ServerManagerITBase {
 
     @Test
     public void sendEditMessageToFailingProcessorTest() throws Exception {
+        // muteException is true by default: the response does not carry the 
message of the exception
+        assertEquals(EXPECTED_MUTED_MSG, 
sendToFailingProcessor("/process_error"));
+    }
+
+    @Test
+    public void sendEditMessageToFailingProcessorNotMutedTest() throws 
Exception {
+        assertEquals(EXPECTED_EXCEPTION_MSG, 
sendToFailingProcessor("/process_error_unmuted"));
+    }
+
+    private String sendToFailingProcessor(String requestUri) throws Exception {
         final AS2ClientConnection clientConnection = getAs2ClientConnection();
         AS2ClientManager clientManager = new 
AS2ClientManager(clientConnection);
 
-        HttpCoreContext context = clientManager.send(EDI_MESSAGE, 
"/process_error", SUBJECT, FROM, AS2_NAME, AS2_NAME,
+        HttpCoreContext context = clientManager.send(EDI_MESSAGE, requestUri, 
SUBJECT, FROM, AS2_NAME, AS2_NAME,
                 AS2MessageStructure.PLAIN,
                 AS2MediaType.APPLICATION_EDIFACT, null, null, null, null, null,
                 null, DISPOSITION_NOTIFICATION_TO, 
SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null,
@@ -587,8 +597,7 @@ public class AS2ServerManagerIT extends 
AS2ServerManagerITBase {
         HttpEntity responseEntity = ((ClassicHttpResponse) 
response).getEntity();
         assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getCode(),
                 "Unexpected status code for response");
-        String errorMessage = new 
String(Streams.readAll(responseEntity.getContent()));
-        assertEquals(EXPECTED_EXCEPTION_MSG, errorMessage, "");
+        return new String(Streams.readAll(responseEntity.getContent()));
     }
 
     @Test
diff --git 
a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
 
b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
index 81e583edf5d9..e32aad4f8421 100644
--- 
a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
+++ 
b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
@@ -76,6 +76,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class AS2ServerManagerITBase extends AbstractAS2ITSupport {
 
     protected static final String PROCESSOR_EXCEPTION_MSG = "Processor 
Exception";
+    // the partner gets the message of the exception only with 
muteException=false
+    protected static final String EXPECTED_MUTED_MSG = "Failed to process AS2 
message";
     protected static final String EXPECTED_EXCEPTION_MSG = "Failed to process 
AS2 message: " + PROCESSOR_EXCEPTION_MSG;
     protected static final String PATH_PREFIX
             = 
AS2ApiCollection.getCollection().getApiName(AS2ServerManagerApiMethod.class).getName();
@@ -172,6 +174,9 @@ public class AS2ServerManagerITBase extends 
AbstractAS2ITSupport {
                 from("as2://" + PATH_PREFIX + 
"/listen?requestUriPattern=/process_error")
                         .process(failingProcessor)
                         .to("mock:as2RcvMsgs");
+                from("as2://" + PATH_PREFIX + 
"/listen?requestUriPattern=/process_error_unmuted&muteException=false")
+                        .process(failingProcessor)
+                        .to("mock:as2RcvMsgs");
 
                 // test route for listen with custom MDN parameters
                 from("as2://" + PATH_PREFIX
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index 11bdf44ac0b4..15220435cce2 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -3456,3 +3456,10 @@ The `httpMethod` option of the endpoint now wins over 
the `CamelHttpMethod` head
 camel-http. Before, the header overrode the option, so a route that received a 
request through an HTTP consumer, which
 sets the header to the method of that request, sent it on with that method 
instead of the method of the endpoint. To
 let the header choose the method, do not set `httpMethod` on the endpoint.
+
+=== camel-as2 - the response to a failed route does not carry the message of 
the exception
+
+The server/listen and receipt/receive consumers have the new `muteException` 
option, `true` by default: when the
+route fails, the HTTP 500 that the partner gets says only that the message (or 
the receipt) could not be processed.
+Before, its body was the message of the exception of the route. Set 
`muteException=false` to send the message of the
+exception as before.
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
index fb004f76400b..62c06701ac0d 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
@@ -610,6 +610,42 @@ public interface AS2EndpointBuilderFactory {
             doSetProperty("userAgent", userAgent);
             return this;
         }
+        /**
+         * If enabled and an Exchange failed processing on the consumer side
+         * (server listen or receipt receive), the HTTP response only says that
+         * the message or the receipt could not be processed, and not the
+         * message of the exception.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: consumer
+         * 
+         * @param muteException the value to set
+         * @return the dsl builder
+         */
+        default AS2EndpointConsumerBuilder muteException(boolean 
muteException) {
+            doSetProperty("muteException", muteException);
+            return this;
+        }
+        /**
+         * If enabled and an Exchange failed processing on the consumer side
+         * (server listen or receipt receive), the HTTP response only says that
+         * the message or the receipt could not be processed, and not the
+         * message of the exception.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: consumer
+         * 
+         * @param muteException the value to set
+         * @return the dsl builder
+         */
+        default AS2EndpointConsumerBuilder muteException(String muteException) 
{
+            doSetProperty("muteException", muteException);
+            return this;
+        }
         /**
          * The access token that is used by the client for bearer
          * authentication.

Reply via email to