0
votes

I could not found any broadcast or pub/sub pattern between Reliable Services in any documentation. Did I miss anything?

My use case is , we need to notify custom event to all the SF stateful service replica in cluster if there any state change in any primary replica.

I am aware of Reliable state manager events which triggers when any change in Reliable collections.

Is there any other broadcast , pub/sub events to communicate between services replicas of the cluster ?

Thanks, Ashish

2

2 Answers

2
votes

Did you see this oss project and package? It allows pub/sub messaging between services.

0
votes

Why reinvent the wheel?

Service Fabric does not contains a brokered messaging engine because:

  1. There are lot's of options already in the market available for this.

  2. Would make your system tight coupled with service fabric runtime.

Why not just use Service Bus Pub\Sub Topics?

If the concern is latency, why not run RabitMQ, ActiveMQ or any other messaging system as a guest executable service or maybe inside a container.

If you had this feature on SF, you would have to write your services dependent on this feature, once you start adding external dependencies, you gonna face an integration challenge to forward these events to systems outside your cluster, having to create a service listening to these events just to forward it to another queue\topic.

It will just add extra work, complexity and maintenance to your solution.