Skip to content

Conversation

@akolodkin
Copy link

#1656

The Issue

The Dapr .NET SDK currently does not support creating multiple subscriptions to the same topic within a single application using programmatic subscriptions (via the /dapr/subscribe endpoint). This limitation exists because:

  1. Subscriptions are uniquely identified only by pubsubName + topic - There is no subscription name field
  2. Multiple handlers for the same topic are not supported - Only the first endpoint is registered, others are ignored with an error
  3. The limitation only affects programmatic subscriptions - Declarative subscriptions (YAML) support metadata.name but programmatic subscriptions do not

Solution

Add subscription name support to allow multiple named subscriptions to the same topic within a single application.

…ubscriptions per topic

Introduces subscription name support across topic metadata, attributes, and routing logic to allow multiple distinct subscriptions to the same topic within a single application.

Enhances topic attributes and subscription models with an optional subscription name to differentiate subscription handlers. Updates routing and subscription grouping to incorporate subscription names for precise subscription management.

Adds example handlers and integration tests demonstrating multiple subscriptions to the same topic distinguished by subscription names.

This improvement enables advanced pubsub scenarios where separate subscription handlers can independently process messages from the same topic without conflict.
@akolodkin akolodkin requested review from a team as code owners November 21, 2025 21:11
@WhitWaldo
Copy link
Contributor

Could you please sign your commits so it passes the DCO check?

I'm not quite following why you'd want this - do you just want to be able to kick off multiple callbacks in response to the same message? Is the point of the name just to differentiate locally (given that the runtime isn't providing it)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants