#8079·dapr

Add Bulk methods to streaming subscriptions

Author: yaron2Created Sep 11, 2024Updated Sep 13, 2026
Labelskind/enhancementstale

Streaming Subscriptions should support the ability to send a bulk of messages to the application, while keeping the ACK functionality of streaming subscriptions as is.

For example, an easy way to add this would be to reuse the existing bulk pub/sub machinery in the Dapr runtime and expose it to the app via the something similar to this updated proto message:

proto
// SubscribeTopicEventsResponseAlpha1 is a message returned from daprd
// when subscribing to a topic via streaming.
message SubscribeTopicEventsResponseAlpha1 {
  oneof subscribe_topic_events_response_type {
    SubscribeTopicEventsResponseInitialAlpha1 initial_response = 1;
    TopicEventRequest event_message = 2;
    repeated TopicEventRequest event_messages = 3;
  }
}

In terms of subscribing, the proto definition for streaming subscriptions would include the exact same specification used for bulk subscription that exists today:

proto
message SubscribeTopicEventsRequestInitialAlpha1 {
  // The name of the pubsub component
  string pubsub_name = 1;

  // The pubsub topic
  string topic = 2;

  // The metadata passing to pub components
  //
  // metadata property:
  // - key : the key of the message.
  map<string, string> metadata = 3;

  // dead_letter_topic is the topic to which messages that fail to be processed
  // are sent.
  optional string dead_letter_topic = 4;

  optional BulkSubscribeAlpha1 bulk_subscribe = 5;
}

message BulkSubscribeAlpha1 {
  bool enabled = 1;
  optional int32 maxMessagesCount = 2;
  optional int32 maxAwaitDurationMs = 3;
}