简体   繁体   中英

Callbacks between azure service fabric services?

I'm calling a Actor which calls a stateless service.

Now I need stateless service to send an acknowledgement back to Actor (callback), once it completes its work.

Is there any mechnism to achieve this in service fabric ?

You can pass ActorReference to the stateless service and then bind the ActorReference to the actor interface type on the receiving side. You can cast the return value of bind method to the actor interface.

I think the most common approach to such kind of communication is to use Service Bus Queues and Pub/Sub pattern https://github.com/loekd/ServiceFabric.ServiceBus

When u need to send the acknowledgement u just publish this message to the MessageBus and handle it in the Actor(subscriber)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM