in_memory¶
- class mersal.outbox.in_memory.InMemoryOutboxStorage[source]¶
Bases:
OutboxStorage- async get_next_message_batch() OutboxMessageBatch[source]¶
Provide messages stored in the outbox.
- async save(outgoing_messages: Sequence[OutgoingMessage], transaction_context: TransactionContext) None[source]¶
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
TransactionContextfor the message that is currently being handled.