Skip to content

Commit 65b0669

Browse files
Merge pull request #259705 from ealsur/users/ealsur/notifications
Cosmos DB - CFP migration: Adding health event migration
2 parents 9678497 + 008fdde commit 65b0669

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

articles/cosmos-db/nosql/how-to-migrate-from-change-feed-library.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: ealsur
55
ms.service: cosmos-db
66
ms.subservice: nosql
77
ms.topic: how-to
8-
ms.date: 09/13/2021
8+
ms.date: 11/28/2023
99
ms.author: maquaran
1010
ms.devlang: csharp
1111
ms.custom: devx-track-dotnet
@@ -42,6 +42,14 @@ For the delegate, you can have a static method to receive the events. If you wer
4242

4343
[!code-csharp[Main](~/samples-cosmosdb-dotnet-v3/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/Program.cs?name=Delegate)]
4444

45+
## Health events and observability
46+
47+
If previously you were using `IHealthMonitor` or you were leveraging `IChangeFeedObserver.OpenAsync` and `IChangeFeedObserver.CloseAsync`, use the [Notifications API](./change-feed-processor.md#life-cycle-notifications).
48+
49+
* `IChangeFeedObserver.OpenAsync` can be replaced with `WithLeaseAcquireNotification`.
50+
* `IChangeFeedObserver.CloseAsync` can be replaced with `WithLeaseReleaseNotification`.
51+
* `IHealthMonitor.InspectAsync` can be replaced with `WithErrorNotification`.
52+
4553
## State and lease container
4654

4755
Similar to the change feed processor library, the change feed feature in .NET V3 SDK uses a [lease container](change-feed-processor.md#components-of-the-change-feed-processor) to store the state. However, the schemas are different.

0 commit comments

Comments
 (0)