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/nosql/change-feed-modes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.reviewer: jucocchi
7
7
ms.service: cosmos-db
8
8
ms.custom: build-2023
9
9
ms.topic: conceptual
10
-
ms.date: 08/14/2023
10
+
ms.date: 07/25/2024
11
11
---
12
12
# Change feed modes in Azure Cosmos DB
13
13
@@ -121,7 +121,7 @@ During the preview, the following methods to read the change feed are available
121
121
|**Method to read change feed**|**.NET**|**Java**|**Python**|**Node.js**|
122
122
| --- | --- | --- | --- | --- |
123
123
|[Change feed pull model](change-feed-pull-model.md)|[>= 3.32.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.0-preview)|[>= 4.42.0](https://mvnrepository.com/artifact/com.azure/azure-cosmos/4.37.0)| No | No |
124
-
|[Change feed processor](change-feed-processor.md)|No|[>= 4.42.0](https://mvnrepository.com/artifact/com.azure/azure-cosmos/4.42.0)| No | No |
124
+
|[Change feed processor](change-feed-processor.md)|[>= 3.40.0-preview.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.40.0-preview.0)|[>= 4.42.0](https://mvnrepository.com/artifact/com.azure/azure-cosmos/4.42.0)| No | No |
Copy file name to clipboardExpand all lines: articles/cosmos-db/nosql/change-feed-processor.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: cosmos-db
8
8
ms.subservice: nosql
9
9
ms.devlang: csharp
10
10
ms.topic: conceptual
11
-
ms.date: 07/10/2024
11
+
ms.date: 07/25/2024
12
12
ms.custom: devx-track-csharp, build-2023
13
13
---
14
14
@@ -51,20 +51,33 @@ Each range is read in parallel. A range's progress is maintained separately from
51
51
52
52
### [.NET](#tab/dotnet)
53
53
54
-
The change feed processor in .NET is currently available only for [latest version mode](change-feed-modes.md#latest-version-change-feed-mode). The point of entry is always the monitored container. In a `Container` instance, you call `GetChangeFeedProcessorBuilder`:
54
+
The change feed processor in .NET is available for [latest version mode](change-feed-modes.md#latest-version-change-feed-mode) and [all versions and deletes mode](change-feed-modes.md#all-versions-and-deletes-change-feed-mode-preview). All versions and deletes mode is in preview and is supported for the change feed processor beginning in version `3.40.0-preview.0`. The point of entry for both modes is always the monitored container.
55
+
56
+
To read using latest version mode, in a `Container` instance, you call `GetChangeFeedProcessorBuilder`:
For both modes, the first parameter is a distinct name that describes the goal of this processor. The second name is the delegate implementation that handles changes.
59
65
60
-
Here's an example of a delegate:
66
+
Here's an example of a delegate for latest version mode:
Afterward, you define the compute instance name or unique identifier by using `WithInstanceName`. The compute instance name should be unique and different for each compute instance you're deploying. You set the container to maintain the lease state by using `WithLeaseContainer`.
65
75
66
76
Calling `Build` gives you the processor instance that you can start by calling `StartAsync`.
67
77
78
+
>[!NOTE]
79
+
> The preceding code snippets are taken from samples in GitHub. You can get the sample for [latest version mode](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed) or [all versions and deletes mode](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeedAllVersionsAndDeletes).
80
+
68
81
## Processing life cycle
69
82
70
83
The normal life cycle of a host instance is:
@@ -93,6 +106,8 @@ You can connect the change feed processor to any relevant event in its [life cyc
93
106
* Register a handler for `WithLeaseReleaseNotification` to be notified when the current host releases a lease and stops processing it.
94
107
* Register a handler for `WithErrorNotification` to be notified when the current host encounters an exception during processing. You need to be able to distinguish whether the source is the user delegate (an unhandled exception) or an error that the processor encounters when it tries to access the monitored container (for example, networking issues).
95
108
109
+
Life cycle notifications are available in both change feed modes. Here's an example of life cycle notifications in latest version mode:
@@ -137,6 +152,8 @@ The change feed processor is initialized, and it starts reading changes from the
137
152
138
153
> [!NOTE]
139
154
> These customization options work only to set up the starting point in time of the change feed processor. After the lease container is initialized for the first time, changing these options has no effect.
155
+
>
156
+
> Customizing the starting point is only available for latest version change feed mode. When using all versions and deletes mode you must start reading from the time the processor is started, or resume from a prior lease state that is within the [continuous backup](../continuous-backup-restore-introduction.md) retention period of your account.
0 commit comments