dotnet-sdk
dotnet-sdk copied to clipboard
Unable to publish message to RabbitMQ
Expected Behavior
I'm using the Dapr .NET sdk and using PublishAsync method to publish messages to rabbit MQ. I expect the message to be published without any issues. I'm using it in Kubernetes. The code can be found at Daprpubsub. The code is also attached herewith.[DaprPubsub.zip]https://github.com/dapr/dotnet-sdk/files/6820240/DaprPubsub.zip) The configuration of the Rabbit MQ is perfect. The component definition is perfect. The dapr SDK is able to reach the rabbit MQ. In fact in the rabbitmq exchange, I was able to find an exchange created with the name of the topic name. There are
Actual Behavior
No Queue is getting created and Message is not present
Steps to Reproduce the Problem
- Install Rabbit MQ in the Kubernetes cluster using Helm from https://charts.bitnami.com/bitnami
- Update the component file with the amqp configuration.
- apply the component in the same name space as that of code
- Deploy the code.
- Execute Kubectl get svc and get the Loadbalancer external IP of the service daprpub. The port will be 5045..
- Assuming the external IP is something like localHost. Access the URL as http://localHost:5045/swagger. The swagger page will be displayed
- In the Swagger UI access the Put in queue method. The method executes without any exception.
Thanks
Ant help in this regard will be greatly appreciated.
Attached is the log from application. Is there any help that can be offered logs.txt
Did you also install Dapr onto the cluster beforehand? Your code is fine so I suspect there is something missing in your deployment. Your logs are for the applications so I would look at the app sidecar and dapr pods logs too. I would look at the health of your cluster too.
Also, these references might be useful: https://github.com/dapr/quickstarts/tree/master/hello-kubernetes and https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/
@jbw , I have attached the Dapr logs from Sidecar Daprlogs.txt here with. Yes I followed the above instructions only to deploy Dapr to K8s. I had deployed before hand itself
The logs don't contain anything for daprsub
sidecar. If correctly configured you should see something like:
app is subscribed to the following topics: [topic name] through pubsub=pubsub" app_id=...
Your issue is with K8s so I would suggest looking at the example application in the links above and being able to observe the status of your cluster by inspecting logs, pods, etc using kubectl
.
In the namespace dapr-system
, there should be a dapr-dashboard
deployment which you can port-forward into which might help also tools like Lens give a visual look into your cluster which can make it easier to inspect.
@jbw, I have redeployed my application and did the steps once again. I'm not able to get the same working. I'm attaching the logs that I received. applog.txt dprSidecarlog.txt As you told I have also port forwarded the dapr dashboard. In that, in the overview section under Dapr Application heading, I see "daprpub" application. What else can I do to find what is wrong?
@jbw any suggestions to resolve this issue
I've raised a PR on your repo to demonstrate 👍🏽 . It's not a Dapr issue so you can close this issue 😃
@VenkateshSrini @jbw - is there anything else to resolve here? This sounds like a general troubleshooting discussion and not a bug in the SDK.
@rynowak , Yes I have installed Dapr first then only the app.
Given the age of the issue, and the general nature of the question, I'm going to close this. If you still need help, feel free to reopen this issue or open a new one.