You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/sql-persistence/transitioning-correlation-ids/sample.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
title: Transitioning Saga Correlation IDs
3
3
summary: An approach for transitioning between different correlation IDs with no downtime
4
-
reviewed: 2024-02-05
4
+
reviewed: 2025-11-26
5
5
component: SqlPersistence
6
6
related:
7
7
- nservicebus/sagas
8
8
---
9
9
10
-
This sample illustrates an approach for transitioning between different [correlation IDs](/persistence/sql/saga.md#correlation-ids) in a way that requires no endpoint downtime or migration of saga data stored in sql.
10
+
This sample illustrates an approach for transitioning between different [correlation IDs](/persistence/sql/saga.md#correlation-ids) in a way that requires no endpoint downtime or migration of saga data stored in SQL.
11
11
12
12
> [!NOTE]
13
13
> The sample uses three "Phase" endpoint projects to illustrate the iterations of a single endpoint in one solution.
@@ -16,9 +16,9 @@ include: sqlpersistence-prereqs
16
16
17
17
## Scenario
18
18
19
-
The sample uses a hypothetical "Order" scenario where the requirement is to transition from an an integer correlation ID `OrderNumber` to a GUID correlation ID `OrderId`.
19
+
The sample uses a hypothetical "Order" scenario where the requirement is to transition from an integer correlation ID `OrderNumber` to a GUID correlation ID `OrderId`.
20
20
21
-
To move between phases, after running each phase adjust the startup project list in solution properties. E.g. after phase 1, disable endpoints that contain "Phase1" in the name, and enable endpoints that contain "Phase2".
21
+
To move between phases, after running each phase, adjust the startup project list in the solution properties. E.g., after phase 1, disable endpoints that contain "Phase1" in the name, and enable endpoints that contain "Phase2".
22
22
23
23
## Phases
24
24
@@ -40,7 +40,7 @@ snippet: sagadataPhase1
40
40
41
41
### Phase 2
42
42
43
-
In the second phase a GUID `OrderId` is added. The saga still maps `StartOrder.OrderNumber` to `OrderSagaData.OrderNumber` in the `ConfigureHowToFindSaga` method. However it also introduces a correlation to `OrderSagaData.OrderId` via a `transitionalCorrelationProperty` in the `[SqlSaga]` attribute.
43
+
In the second phase, a GUID `OrderId` is added. The saga still maps `StartOrder.OrderNumber` to `OrderSagaData.OrderNumber` in the `ConfigureHowToFindSaga` method. However, it also introduces a correlation to `OrderSagaData.OrderId` via a `transitionalCorrelationProperty` in the `[SqlSaga]` attribute.
44
44
45
45
#### Message
46
46
@@ -55,11 +55,11 @@ snippet: sagaPhase2
55
55
snippet: sagadataPhase2
56
56
57
57
> [!WARNING]
58
-
> Prior to moving to Phase 3 it is necessary to verify that all existing sagas have the `Correlation_OrderId` column populated. This can either be inferred by the business knowledge (i.e. certain saga may have a known and constrained lifetime) or by querying the database.
58
+
> Prior to moving to Phase 3, it is necessary to verify that all existing sagas have the `Correlation_OrderId` column populated. This can either be inferred by the business knowledge (i.e., certain saga may have a known and constrained lifetime) or by querying the database.
59
59
60
60
### Phase 3
61
61
62
-
In the third phase, the integer `OrderNumber` is removed leaving only the `OrderId`. The saga now maps `StartOrder.OrderId` to `OrderSagaData.OrderId` in the `ConfigureHowToFindSaga` method.
62
+
In the third phase, the integer `OrderNumber` is removed, leaving only the `OrderId`. The saga now maps `StartOrder.OrderId` to `OrderSagaData.OrderId` in the `ConfigureHowToFindSaga` method.
0 commit comments