Example #1
0
 def ListTopicSubscriptions(self, request, context):
     """Lists all topics subscribed by this app."""
     return appcallback_v1.ListTopicSubscriptionsResponse(
         subscriptions=self._registered_topics)
Example #2
0
 def ListTopicSubscriptions(self, request, context):
     # Dapr will call this method to get the list of topics the app
     # wants to subscribe to. In this example, we are telling Dapr
     # To subscribe to a topic named TOPIC_A
     return appcallback_v1.ListTopicSubscriptionsResponse(subscriptions=[appcallback_v1.TopicSubscription(topic='TOPIC_A'),])