quickstarts
quickstarts copied to clipboard
Same dapr components in multiple apps
consider a scenario, where I want to publish one message from one app to other using dapr pub/sub, from one microservice app I am publishing the message and in other microservice I am consuming same message using Topic sub, now first when I try to deploy subscription app using az containerapp create with enable-dapr true and dapr-components same as of publisher, azure container apps wont allow me to create another app with same components, now when I remove dapr-components part, and link my subscription client to publishing client using AddDapr(usgrpc and usehttpclient), it gives an error that there are no dapr- components, now I am confused how to architect my application if other application cant have its own components
Hi @SarangRapid thanks for trying Container Apps + Dapr and reporting this.
If I understand this right you'd like to use the same Pubsub component in both a publisher containerapp and a subscriber containerapp. And these containerapps are in the same containerapp environment?
This should work so long as both container apps both enable-dapr and also get created with the component config for the same Pub-sub. component. Can you share exactly the command you used to deploy both container apps?
Note a new feature is coming which allows shared Dapr components at the environment level of container apps.
@greenie-msft could you please have a look at this? Maybe we should move to a better repo too?
@paulyuk and @greenie-msft Should we close this if we already create an issue in the other document?
Yes @amulyavarote we should close. I believe this is resolved in the GA version of container apps. Dapr components are global to the whole environment by default unless you further scope them. This is in essence "fixed"! FYI @SarangRapid
Fixed!