question

mimckitt avatar image
0 Votes"
mimckitt asked ·

Trending on MSDN: Multiple Service Fabric Reliable Dictionary Notifications

I have stateful service fabric service where the replica count is 3. In this stateful service, I have a reliable dictionary. I want to track notifications for each CRUD operation which is performed on the reliable dictionary.


I have followed the link to integrate reliable dictionary notifications

If I use a one-node cluster and replica count is 1, I will be getting one notification for each operation (Create, Update, Delete). But If I use five-node cluster and replica count is 3, I will be getting three notifications for each operation, which is causing duplicate records in my business logic, I need only one notification for each operation.


My expectation is to get a notification for each replica when the dictionary has been updated.


Can anyone help me out to resolve this issue?

Sourced from MSDN


azure-service-fabric
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

olufemiaMSFT avatar image
0 Votes"
olufemiaMSFT answered ·

Welcome to the Microsoft Q&A (Preview) platform. Happy to answer your questions.

Currently, notifications fire on all replicas when the changes show up.
This means in your code, you can either



  1. Not hook up the notifications on secondary replicas or unhook the notifications when the replicas become secondaries (and rehook them when becoming primary)

  2. Discard the notifications that fire on the secondaries Both would require adding an override to OnChangeRoleAsync

You can follow this document for more information.


Sourced from MSDN


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.