Dapr extension pub/sub error: no pubsub is configured
See original GitHub issueWhen running Type with the Dapr extension using pub/sub, I got an exception with daprClient.PublishEventAsync("pubsub", "weather", weather)
:
Message=Publish operation failed: the Dapr endpoint indicated a failure.
Source=Dapr.Client
Inner Exception: RpcException: Status(StatusCode="FailedPrecondition", Detail="no pubsub is configured")
I do not get the exception when running dapr directly: dapr run --app-id publisher -- dotnet run
I can verify in the Components tab of the Dapr Dashboard that pubsub is configured properly.
_Originally posted by @tonysneed in https://github.com/dotnet/tye/issues/984#issuecomment-800631405_
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Troubleshoot Pub/Sub with the .NET SDK
The pub/sub endpoints are registered with Dapr, but the request is not reaching the desired endpoint. Step 1: Turn up the logs. This...
Read more >Tutorial: Configure state store and pub/sub message broker
For this tutorial, we describe how to get up and running with Redis. Step 1: Create a Redis store. Dapr can use any...
Read more >Configure Pub/Sub components with multiple namespaces
In this case, the PubSub component must be provisioned on each namespace. Note. Namespaces are a Dapr concept used for scoping applications and...
Read more >Publish and subscribe overview
Publish and subscribe (pub/sub) enables microservices to communicate with each other using messages for event-driven architectures.
Read more >How to: Set up pub/sub namespace consumer groups
Dapr solves multi-tenancy at-scale with its pub/sub namespace consumer groups construct. Without namespace consumer groups. Let's say you have a Kubernetes ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jkotalik Are you able to reproduce the error using the steps I provided? This is preventing me from using Tye to debug Dapr pub/sub using Visual Studio. Thanks.
@tonysneed I believe this is/was expected behavior. At the time this issue was filed, Tye invoked the sidecar (
daprd
) directly.daprd
would not load any components if no--components-path
was specified (which is the case if nocomponents-path
exists in thetye.yaml
). However,dapr run
invokes the sidecar and passes a default--components-path
argument (~/.dapr/components
) if not given a specific value. Since Dapr initialization typically scaffolds a defaultpubsub
component, your application likely worked, despite actually using a different component configuration than expected (the one in your repo). By adding thecomponents-path
totye.yaml
,daprd
ends up with a specific--components-path
.In any case, Tye now uses
dapr run
rather thandaprd
directly, so applications will use the default Dapr components (just like they would on the command line) unless redirected by acomponents-path
property set intye.yaml
. In other words, if you have specific Dapr component configuration in your repo, you should setcomponents-path
intye.yaml
.Let me know if that makes sense; if so, I’ll close this issue.