From 4a5f9392a3112360d6c9dade32fdbf096efe5e6f Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 14 May 2024 23:25:42 +0100 Subject: [PATCH] Subscriptions: bi-directional subscription & publish streaming. Adds SubscribeTopicEvents proto API which dynamically subscribes to pubsub topics based on https://github.com/dapr/proposals/pull/52. This is a basic gRPC implementation of the API whereby, like Subscription hot-reloading today, subscribing to a topic will reload _every_ active subscription for the current daprd. In a future PR, reloading of Subscriptions will be granular to the specific pubsub topic. Stream subscriptions are also only active once daprd declares the application as both present and ready. Dynamic stream subscriptions should be active both whether a app is running or not, as well as whether it is ready or not. This will be addressed in a future PR. Signed-off-by: joshvanl --- pkg/api/grpc/endpoints.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/api/grpc/endpoints.go b/pkg/api/grpc/endpoints.go index 51914fa7cd6..4cafab78c40 100644 --- a/pkg/api/grpc/endpoints.go +++ b/pkg/api/grpc/endpoints.go @@ -47,6 +47,9 @@ var endpoints = map[string][]string{ "publish.v1alpha1": { daprRuntimePrefix + "v1.Dapr/BulkPublishEventAlpha1", }, + "subscribe.v1": { + daprRuntimePrefix + "v1.Dapr/SubscribeTopicEvents", + }, "bindings.v1": { daprRuntimePrefix + "v1.Dapr/InvokeBinding", },