Table of Contents

Class OutboxDeadLetter

Namespace
Xapi.Client.Outbox
Assembly
Xapi.Client.Outbox.dll

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

statement Statement

The Statement. It must have an id.

reason OutboxDeadLetterReason

Why it was not delivered.

error string

A description of the error.

deadLetteredAt DateTimeOffset

When it was moved to the dead letters.

Exceptions

ArgumentException

statement has no id.

Properties

Attempts

How many sends of it had failed with a transient error before.

public int Attempts { get; init; }

Property Value

int

DeadLetteredAt

When it was moved to the dead letters.

public DateTimeOffset DeadLetteredAt { get; }

Property Value

DateTimeOffset

EnqueuedAt

When the Statement was first added to the outbox.

public DateTimeOffset EnqueuedAt { get; init; }

Property Value

DateTimeOffset

Error

A description of the error, for example the exception message with the LRS's status code.

public string Error { get; }

Property Value

string

Reason

Why it was not delivered.

public OutboxDeadLetterReason Reason { get; }

Property Value

OutboxDeadLetterReason

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

string

Statement

The Statement.

public Statement Statement { get; }

Property Value

Statement

StatementId

The Statement id.

public Guid StatementId { get; }

Property Value

Guid

StatusCode

The HTTP status code the LRS answered with, or null when no response decided it.

public HttpStatusCode? StatusCode { get; init; }

Property Value

HttpStatusCode?