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: articles/cosmos-db/how-to-migrate-from-change-feed-library.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Migrate from the change feed processor library to the Azure Cosmos DB SDK V3
2
+
title: Migrate from the change feed processor library to the Azure Cosmos DB .NET V3 SDK
3
3
description: Learn how to migrate your application from using the change feed processor library to the Azure Cosmos DB SDK V3
4
4
author: ealsur
5
5
ms.service: cosmos-db
@@ -8,29 +8,29 @@ ms.date: 09/16/2019
8
8
ms.author: maquaran
9
9
---
10
10
11
-
# Migrate from the change feed processor library to the Azure Cosmos DB SDK V3
11
+
# Migrate from the change feed processor library to the Azure Cosmos DB .NET V3 SDK
12
12
13
-
This article describes the required steps to migrate an existing application's code that uses the [library](https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet) to consume the [change feed](change-feed.md)to the SDK V3.
13
+
This article describes the required steps to migrate an existing application's code that uses the [change feed processor library](https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet) to the [change feed](change-feed.md)feature in the latest version of the .NET SDK (also referred as .NET V3 SDK).
14
14
15
15
## Required code changes
16
16
17
-
The SDK V3 includes several breaking changes in the public APIs. The main steps to address during the migration are:
17
+
The .NET V3 SDK has several breaking changes, the following are the key steps to migrate your application:
18
18
19
-
1. Convert `DocumentCollectionInfo` instances into `Container` references for the monitored and leases containers.
20
-
1. Customizations that were using `WithProcessorOptions` should be using`WithLeaseConfiguration` and `WithPollInterval` for intervals, `WithStartTime`[for start time](how-to-configure-change-feed-start-time.md), and `WithMaxItems` to define the maximum item count.
21
-
1.If specifying `ChangeFeedProcessorOptions.LeasePrefix`, use that same value as the `processorName`on `GetChangeFeedProcessorBuilder`, or use `string.Empty` otherwise.
19
+
1. Convert the `DocumentCollectionInfo` instances into `Container` references for the monitored and leases containers.
20
+
1. Customizations that use `WithProcessorOptions` should be updated to use`WithLeaseConfiguration` and `WithPollInterval` for intervals, `WithStartTime`[for start time](how-to-configure-change-feed-start-time.md), and `WithMaxItems` to define the maximum item count.
21
+
1.Set the `processorName` on `GetChangeFeedProcessorBuilder` to match the value configured on `ChangeFeedProcessorOptions.LeasePrefix`, or use `string.Empty` otherwise.
22
22
1. The changes are no longer delivered as a `IReadOnlyList<Document>`, instead, it's a `IReadOnlyCollection<T>` where `T` is a type you need to define, there is no base item class anymore.
23
-
1. To handle the changes, you no longer need an Observer implementation, [just a delegate](change-feed-processor.md#implementing-the-change-feed-processor). The delegate can be a static Function or, if you need to maintain state across executions, you can create your own class and pass an instance method as delegate.
23
+
1. To handle the changes, you no longer need an implementation, instead you need to [define a delegate](change-feed-processor.md#implementing-the-change-feed-processor). The delegate can be a static Function or, if you need to maintain state across executions, you can create your own class and pass an instance method as delegate.
24
24
25
-
For example, if the original code is building the change feed processor like this:
25
+
For example, if the original code to build the change feed processor looks as follows:
@@ -43,7 +43,7 @@ The SDK V3 change feed processor will detect any old library state and migrate i
43
43
You can safely stop the application using the old code, migrate the code to the new version, start the migrated application, and any changes that happened while the application was stopped, will be picked up and processed by the new version.
44
44
45
45
> [!NOTE]
46
-
> Migrations from applications using the library to the SDK V3 are one-way, since the state (leases) will be migrated to the new schema that is not backward compatible.
46
+
> Migrations from applications using the library to the .NET V3 SEK are one-way, since the state (leases) will be migrated to the new schema. The migration is not backward compatible.
0 commit comments