From 35bc35802fb7c6b6abfdcb0a55b04330ff3fe9ea Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Sun, 1 Sep 2024 21:11:59 +0200 Subject: [PATCH 1/3] Transactional Session: Skip 7 and 8 when there are no outgoing operations --- nservicebus/transactional-session/index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nservicebus/transactional-session/index.md b/nservicebus/transactional-session/index.md index 8e4e061ae5f..5a4ebad3fcb 100644 --- a/nservicebus/transactional-session/index.md +++ b/nservicebus/transactional-session/index.md @@ -176,11 +176,14 @@ Internally, the transactional session doesn't use a single transaction that span 3. A transaction is started on the storage seam. 4. The user can execute any required message operations using the transactional session. 5. The user can store any data using the persistence-specific session, which is accessible through the transactional session. -6. When all operations are registered, the user calls ´Commit´ on the transactional session. -7. A control message to complete the transaction is dispatched to the local queue. The control message is independent of the message operations and is not stored in the outbox record. +6. When all operations are registered, the user calls `Commit` on the transactional session. +7. A control message to complete the transaction is dispatched to the local queue. The control message is independent of the message operations and is not stored in the outbox record. W 8. The message operations are converted and stored into an outbox record. 9. The transaction is committed, and the outbox record and business data modifications are stored atomically. +> [!NOTE] +> Steps 7 and 8 are skipped when no message operations are executed in the transactional session to avoid wasting queue and database resources. + ### Phase 2 The endpoint receives the control message and processes it as follows: From af042741472f0c63bc1800a089ada2b45ba7ae88 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Sun, 1 Sep 2024 21:13:11 +0200 Subject: [PATCH 2/3] Update index.md --- nservicebus/transactional-session/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nservicebus/transactional-session/index.md b/nservicebus/transactional-session/index.md index 5a4ebad3fcb..b58bdd5c0ad 100644 --- a/nservicebus/transactional-session/index.md +++ b/nservicebus/transactional-session/index.md @@ -182,7 +182,7 @@ Internally, the transactional session doesn't use a single transaction that span 9. The transaction is committed, and the outbox record and business data modifications are stored atomically. > [!NOTE] -> Steps 7 and 8 are skipped when no message operations are executed in the transactional session to avoid wasting queue and database resources. +> Steps 7 and 8 are skipped, and as a consequence Phase 2, when no message operations are executed in the transactional session to avoid wasting queue and database resources. ### Phase 2 From 99118362821a22946e1af9ad0b6dabe7507fcb31 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Sun, 1 Sep 2024 21:13:28 +0200 Subject: [PATCH 3/3] Update nservicebus/transactional-session/index.md --- nservicebus/transactional-session/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nservicebus/transactional-session/index.md b/nservicebus/transactional-session/index.md index b58bdd5c0ad..7855ded428a 100644 --- a/nservicebus/transactional-session/index.md +++ b/nservicebus/transactional-session/index.md @@ -177,7 +177,7 @@ Internally, the transactional session doesn't use a single transaction that span 4. The user can execute any required message operations using the transactional session. 5. The user can store any data using the persistence-specific session, which is accessible through the transactional session. 6. When all operations are registered, the user calls `Commit` on the transactional session. -7. A control message to complete the transaction is dispatched to the local queue. The control message is independent of the message operations and is not stored in the outbox record. W +7. A control message to complete the transaction is dispatched to the local queue. The control message is independent of the message operations and is not stored in the outbox record. 8. The message operations are converted and stored into an outbox record. 9. The transaction is committed, and the outbox record and business data modifications are stored atomically.