Class OutboxDeadLetter
A Statement the outbox gave up on, with the reason. Dead letters stay in the store until they are requeued (RequeueDeadLetterAsync(Guid, CancellationToken)) or removed (RemoveDeadLetterAsync(Guid, CancellationToken)).
public sealed record OutboxDeadLetter : IEquatable<OutboxDeadLetter>
- Inheritance
-
OutboxDeadLetter
- Implements
- Inherited Members
Constructors
OutboxDeadLetter(Statement, OutboxDeadLetterReason, string, DateTimeOffset)
Creates a dead letter.
public OutboxDeadLetter(Statement statement, OutboxDeadLetterReason reason, string error, DateTimeOffset deadLetteredAt)
Parameters
statementStatementThe Statement. It must have an id.
reasonOutboxDeadLetterReasonWhy it was not delivered.
errorstringA description of the error.
deadLetteredAtDateTimeOffsetWhen it was moved to the dead letters.
Exceptions
- ArgumentException
statementhas no id.
Properties
Attempts
How many sends of it had failed with a transient error before.
public int Attempts { get; init; }
Property Value
DeadLetteredAt
When it was moved to the dead letters.
public DateTimeOffset DeadLetteredAt { get; }
Property Value
EnqueuedAt
When the Statement was first added to the outbox.
public DateTimeOffset EnqueuedAt { get; init; }
Property Value
Error
A description of the error, for example the exception message with the LRS's status code.
public string Error { get; }
Property Value
Reason
Why it was not delivered.
public OutboxDeadLetterReason Reason { get; }
Property Value
ResponseBody
The LRS's response body, which usually says what is wrong with the Statement. Long bodies are cut.
public string? ResponseBody { get; init; }
Property Value
Statement
The Statement.
public Statement Statement { get; }
Property Value
StatementId
The Statement id.
public Guid StatementId { get; }
Property Value
StatusCode
The HTTP status code the LRS answered with, or null when no response decided it.
public HttpStatusCode? StatusCode { get; init; }