Table of Contents

Interface IInMemoryOutboxBuilder

Namespace
Excalibur.Outbox.InMemory
Assembly
Excalibur.Outbox.InMemory.dll

Fluent builder interface for configuring in-memory outbox settings.

public interface IInMemoryOutboxBuilder

Examples

outbox.UseInMemory(inmemory =>
{
    inmemory.MaxMessages(1000)
            .RetentionPeriod(TimeSpan.FromHours(1));
});

Remarks

This builder configures in-memory-specific options such as capacity limits and retention periods for testing and development scenarios. All methods return this for method chaining.

Methods

MaxMessages(int)

Sets the maximum number of messages to retain in the in-memory store.

IInMemoryOutboxBuilder MaxMessages(int count)

Parameters

count int

The maximum message count. Zero means unlimited.

Returns

IInMemoryOutboxBuilder

The builder for fluent chaining.

Remarks

Default is 10000. When the limit is reached, older sent messages are evicted first.

Exceptions

ArgumentOutOfRangeException

Thrown when count is negative.

RetentionPeriod(TimeSpan)

Sets the default retention period for sent messages.

IInMemoryOutboxBuilder RetentionPeriod(TimeSpan period)

Parameters

period TimeSpan

The retention period. Must be positive.

Returns

IInMemoryOutboxBuilder

The builder for fluent chaining.

Remarks

Default is 7 days. After this period, sent messages are eligible for cleanup.

Exceptions

ArgumentOutOfRangeException

Thrown when period is not positive.