Table of Contents

Class InboxOptions

Namespace
Ratatoskr.EfCore
Assembly
Ratatoskr.EfCore.dll

Configuration options for the inbox pattern.

public class InboxOptions
Inheritance
InboxOptions
Inherited Members

Properties

BatchSize

Number of handler statuses to process per batch. Default: 100.

CleanupBatchSize

Maximum number of rows to delete per cleanup batch to avoid long-running transactions. Only applies when RetentionPeriod is set. Default: 10000.

CleanupInterval

How often the cleanup service runs to delete old completed handler statuses. Only applies when RetentionPeriod is set. Default: 1 hour.

CleanupLockName

Name of the distributed lock used by the cleanup service. Only one instance acquires the lock per cleanup cycle; others skip the cycle. Default: "InboxCleanup_{DbContextTypeName}" (auto-generated per DbContext to avoid collisions).

ConsumeChannelInboxRequirement

Controls whether consume channels are required to configure UseInbox<TDbContext>(). Default: None.

HandlerTimeout

Maximum time a handler is allowed to run before being cancelled. When set, the handler receives a cancellation token that fires after this duration. Timeout cancellation is treated as a handler failure (increments ErrorCount) and will eventually lead to poisoning after MaxRetries. Default: null (no timeout).

LockAcquireTimeout

Maximum time to wait when acquiring the distributed lock. Default: 60 seconds.

LockName

Name of the distributed lock. Default: "InboxProcessor_{DbContextTypeName}" (auto-generated per DbContext to avoid collisions).

MaxRetries

Maximum number of retry attempts before marking a handler status as poisoned. Default: 5.

MaxRetryDelay

Maximum backoff delay between handler retry attempts. Default: 5 minutes.

PollingInterval

How often to poll the database for pending handler deliveries. Default: 30 seconds.

RestartDelay

How long to wait before restarting after a crash. Default: 5 seconds.

RetentionPeriod

How long to keep completed handler statuses before automatic cleanup deletes them. Poisoned statuses are never auto-deleted — they require manual investigation. Orphaned inbox messages (with no remaining handler statuses) are also deleted. Default: null (automatic cleanup disabled).

StuckMessageThreshold

How long a handler status can be in "processing" state before it's considered stuck. Default: 5 minutes.