Table of Contents

Class InMemoryOutbox

Namespace
Silverback.Messaging.Producing.TransactionalOutbox
Assembly
Silverback.Storage.Memory.dll

The in-memory outbox.

public class InMemoryOutbox
Inheritance
InMemoryOutbox
Inherited Members

Constructors

InMemoryOutbox()

public InMemoryOutbox()

Properties

ItemsCount

Gets the number of items in the storage.

public int ItemsCount { get; }

Property Value

int

Methods

Add(OutboxMessage)

Adds the specified item to the storage.

public void Add(OutboxMessage outboxMessage)

Parameters

outboxMessage OutboxMessage

The message to add.

Get(int)

Gets the specified number of items from the storage, starting from the oldest.

public IReadOnlyCollection<OutboxMessage> Get(int count)

Parameters

count int

Specifies the number of items to retrieve.

Returns

IReadOnlyCollection<OutboxMessage>

The items.

GetMaxAge()

Gets a TimeSpan representing the time elapsed since the oldest message currently in the storage was written.

public TimeSpan GetMaxAge()

Returns

TimeSpan

The TimeSpan representing the time elapsed since the oldest message currently in the storage was written.

Remove(IEnumerable<OutboxMessage>)

Removes the specified items from the storage.

public void Remove(IEnumerable<OutboxMessage> outboxMessages)

Parameters

outboxMessages IEnumerable<OutboxMessage>

The messages to remove.