dapr / dapr/rust-sdk

Add Streaming Subscription Support

Open
#186 1 comment 0 reactions 0 assignees View on GitHub
enhancement P1 pinned
Dominant language
Rust
Stars
252
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Dapr v1.14 adds support for [streaming subscriptions](https://github.com/dapr/proposals/blob/main/0013-RS-pubsub-subscription-streaming.md) which allows for dynamically subscribing to pubsub topics over a bi-directional gRPC stream. This API is exposed via the [SubscribeTopicEventsAlpha1](https://github.com/dapr/dapr/blob/master/dapr/proto/runtime/v1/dapr.proto#L64) gRPC API.

On first call, the client sends an [InitialRequest](https://github.com/dapr/dapr/blob/7ea7016c0150e6a7b7bc7c30e34d56f0001c5e90/dapr/proto/runtime/v1/dapr.proto#L434) containing the pubsub, topic name, etc. From then on, topic event messages are sent from daprd to the client over the stream. The client reports the processing status of this message back to daprd. A message will not be considered processed until the client has responded with this status. There can be multiple in-flight topic messages. Daprd unsubscribes from the topic when the stream is closed.

https://github.com/dapr/go-sdk/pull/578 is a reference implementation for the go-sdk.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.