#[non_exhaustive]pub enum DeadLetterReason {
UnknownPid(u32),
UnknownConversation {
conversation_id: String,
},
VersionMismatch {
expected: String,
received: String,
},
DuplicateMessage {
inbox_key: String,
},
ProcessingError {
message: String,
},
OutboxExhausted {
message_id: OutboxMessageId,
message_type: String,
recipient: String,
last_error: String,
attempts: u32,
},
}Expand description
Structured reason why an inbound message was rejected.
The variant gives the dispatch path enough information to emit an
actionable CONTRL or log entry. Adding new variants is a non-breaking
change thanks to #[non_exhaustive].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownPid(u32)
No workflow is registered for this PID in the PidRouter.
The PID is either from a future BDEW release not yet deployed or a malformed message. Respond with a CONTRL negative acknowledgement.
UnknownConversation
No in-flight process matched the inbound conversation_id.
This typically means the process completed, was never started, or
the ProcessRegistry was lost on restart (see.
VersionMismatch
The message’s format version has no registered MessageAdapter.
Either the adapter registry is incomplete (see or the sender is using a deprecated / future format version.
Fields
DuplicateMessage
A message with this inbox key was already accepted (AS4 duplicate).
The AS4 sender retries for up to 72 hours. The InboxStore
detected the duplicate and the message must not be processed again.
ProcessingError
A workflow or adapter returned a processing error.
The message was routed correctly but could not be processed. Use this variant when the failure is definitive (not retriable).
OutboxExhausted
The outbox delivery worker gave up after exhausting all retry attempts.
The message was re-queued max_attempts times and never successfully
delivered to the AS4 endpoint (or ERP webhook). The message is removed
from the outbox and recorded here for regulatory audit.
Fields
message_id: OutboxMessageIdThe outbox message ID of the undeliverable message.
Implementations§
Trait Implementations§
Source§impl Clone for DeadLetterReason
impl Clone for DeadLetterReason
Source§fn clone(&self) -> DeadLetterReason
fn clone(&self) -> DeadLetterReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more