Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Consumer ID in Dapr Topic Subscription #1360

Open
mshashi0306 opened this issue Oct 14, 2024 · 4 comments
Open

Issue with Consumer ID in Dapr Topic Subscription #1360

mshashi0306 opened this issue Oct 14, 2024 · 4 comments
Labels
area/client/pubsub kind/bug Something isn't working

Comments

@mshashi0306
Copy link

I'm working with a Dapr application, and I'm having trouble with my topic subscription setup in the following code:

builder.MapControllerRoute("ReceiveFeedEvent", "/ReceiveFeedEvent").WithTopic(new TopicOptions { PubsubName = Config.DaprAlertFeedConsumerName, Name = configuration[Config.AlertFeedTopicNameKey], Metadata = new Dictionary<string, string>() { { "consumerID","feed"} } });

I'm using this configuration to set up a route that receives events from a specified topic. However, it seems that the consumerID I specified in the metadata does not work as expected.

Kindly help if there is a specific format or requirement for the consumerID in Dapr subscriptions?

I am trying to subscribe multiple subscription under one topic using Dapr.

@mshashi0306 mshashi0306 added the kind/bug Something isn't working label Oct 14, 2024
@WhitWaldo
Copy link
Contributor

@mshashi0306
I believe the consumer ID should be populated in the YAML component's metadata field as indicated in the Azure Service Bus Topic component spec, not in the topic options in the C# project.

@WhitWaldo
Copy link
Contributor

@mshashi0306 Have you had an opportunity to try out my suggestion?

@mshashi0306
Copy link
Author

Yes @WhitWaldo , I have tried adding the consumerId to the YAML file, but it requires creating multiple service bus component files for each subscription.

I’m looking to have a single YAML file without the consumerId, as I have multiple subscriptions under one topic.

Could you please help with this?

@WhitWaldo
Copy link
Contributor

I've raised your question on Discord in hopes someone there knows as I'm afraid I don't immediately see how you'd pass the consumer ID in any but a declarative instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client/pubsub kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants