Skip to content

Commit 5b11968

Browse files
Azure Table transactions review
1 parent b4a492e commit 5b11968

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

persistence/azure-table/transactions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ component: ASP
44
versions: 'ASTP:[3,]'
55
related:
66
- nservicebus/outbox
7-
reviewed: 2024-02-09
7+
reviewed: 2025-11-24
88
---
99

1010
partial: intro
1111

1212
A custom [behavior](/nservicebus/pipeline/manipulate-with-behaviors.md) must be introduced to identify and insert the `TableEntityPartitionKey` value into the pipeline context for use by storage operations that occur during the processing of a given message.
1313

14-
> [!NOTE]
14+
> [!IMPORTANT]
1515
> Do not use a [message mutator](/nservicebus/pipeline/message-mutators.md) to identify the partition key. Message mutators do not offer the necessary control or timing to reliably interact with this persistence.
1616
1717
The custom behavior can be introduced in one of the two stages:

persistence/azure-table/transactions_sharing_astp_[3,5).partial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Sharing the transaction
22

3-
Once a behavior is introduced to identify the partition key for a given message, it is possible to share a Azure Table [TableBatchOperation](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.table.tablebatchoperation?view=azure-dotnet) between both the Saga persistence and business data. The shared `TableBatchOperation` can then be used to persist document updates for both concerns atomically.
3+
Once a behavior is introduced to identify the partition key for a given message, it is possible to share an Azure Table [TableBatchOperation](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.table.tablebatchoperation?view=azure-dotnet) between both the Saga persistence and business data. The shared `TableBatchOperation` can then be used to persist document updates for both concerns atomically.
44

55
### Within a handler method using `IMessageHandlerContext`
66

@@ -18,6 +18,6 @@ For custom types that require access to the shared `TableBatchOperation`:
1818

1919
snippet: TransactionalBatchRegisteredWithDependencyInjectionResolvedInCustomType
2020

21-
And alternatively to using the the extension method `IMessageHandlerContext.SynchronizedStorageSession.AzureTablePersistenceSession()`:
21+
And alternatively to using the extension method `IMessageHandlerContext.SynchronizedStorageSession.AzureTablePersistenceSession()`:
2222

2323
snippet: TransactionalBatchRegisteredWithDependencyInjectionResolvedInHandler
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Sharing the transaction
22

3-
Once a behavior is introduced to identify the partition key for a given message, it is possible to share a batch, represented in Azure Table by `List<TableTransactionAction>` between both the Saga persistence and business data. This list can then be used to persist document updates for both concerns atomically.
3+
Once a behavior is introduced to identify the partition key for a given message, it is possible to share a batch, represented in Azure Table by `List<TableTransactionAction>` between both the Saga persistence and business data. This batch can then be used to persist document updates for both concerns atomically.
44

55
### Within a handler method using `IMessageHandlerContext`
66

7-
To use the shared `List<TableTransactionAction>` in a message handler:
7+
To use the shared `List<TableTransactionAction>` batch in a message handler:
88

99
snippet: HandlerSharedTransaction
1010

@@ -14,10 +14,10 @@ The `TestableAzureTableStorageSession` class in the `NServiceBus.Testing` namesp
1414

1515
### With dependency injection
1616

17-
For custom types that require access to the shared `List<TableTransactionAction>`:
17+
For custom types that require access to the shared `List<TableTransactionAction>` batch:
1818

1919
snippet: TransactionalBatchRegisteredWithDependencyInjectionResolvedInCustomType
2020

21-
And alternatively to using the the extension method `IMessageHandlerContext.SynchronizedStorageSession.AzureTablePersistenceSession()`:
21+
And alternatively to using the extension method `IMessageHandlerContext.SynchronizedStorageSession.AzureTablePersistenceSession()`:
2222

2323
snippet: TransactionalBatchRegisteredWithDependencyInjectionResolvedInHandler

0 commit comments

Comments
 (0)