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
Methods
Add(OutboxMessage)
Adds the specified item to the storage.
public void Add(OutboxMessage outboxMessage)
Parameters
outboxMessageOutboxMessageThe 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
countintSpecifies 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
outboxMessagesIEnumerable<OutboxMessage>The messages to remove.