in_memory

class mersal.outbox.in_memory.InMemoryOutboxStorage

Bases: OutboxStorage

__init__() None
async get_next_message_batch() OutboxMessageBatch

Provide messages stored in the outbox.

async save(outgoing_messages: Sequence[OutgoingMessage], transaction_context: TransactionContext) None

Save outbox messages.

The TransactionContext can be used to obtain objects related to the current message being handled. For example, to obtain the database transaction/session.

Parameters:
  • outgoing_messages – A list of messages to be stored in the outbox.

  • transaction_context – The TransactionContext for the message that is currently being handled.