pub struct DefaultRouteErrorHandler {
pub use_original_message: bool,
/* private fields */
}Expand description
Default implementation of RouteErrorHandler. Owns DLC producer exclusively. Encapsulates retry/onException/DLC logic.
Uses SyncBoxProcessor internally so the handler is Send + Sync as required
by the RouteErrorHandler trait.
Fields§
§use_original_message: boolWhen true, restore the original Message (body and headers, pre-route, pre-mutation)
before forwarding to the DLC/handler. The original message is stashed by
RouteChannelService::call as the ORIGINAL_MESSAGE_EXTENSION extension.
Implementations§
Source§impl DefaultRouteErrorHandler
impl DefaultRouteErrorHandler
pub fn new( dlc_producer: Option<BoxProcessor>, policies: Vec<(ExceptionPolicy, Option<BoxProcessor>)>, ) -> Self
Sourcepub fn with_use_original_message(self, enabled: bool) -> Self
pub fn with_use_original_message(self, enabled: bool) -> Self
Enable restoration of the original message before forwarding to DLC.
Sourcepub fn with_business_seam_bypass(
self,
enabled: bool,
synthetic_policy: Option<usize>,
) -> Self
pub fn with_business_seam_bypass( self, enabled: bool, synthetic_policy: Option<usize>, ) -> Self
Enable the HTTP reply-seam bypass (business-error-model Task 2.2).
synthetic_policy is the index of the synthetic catch-all Handled
policy (see Self::business_seam_bypass); None when all policies
are author-authored.
Sourcepub fn with_reply_seam(self, enabled: bool) -> Self
pub fn with_reply_seam(self, enabled: bool) -> Self
Declare the route’s consumer as the HTTP transport (bd rc-c3vds): the
route’s replies finalize through the transport’s reply finalizer, so
an unmatched propagate is transport-owned and the handler logs DEBUG
only. See Self::reply_seam.