I have implemented the Dapr Subscriber but it's not working and it's not receiving any data.
[Topic("pubSubName", "topicName")]
[HttpPost("/topicName")]
public ActionResult ProcessData([FromBody] string data)
{
_logger.LogInformation($"Received data: {data}");
return Ok();
}
I have found the issue I was running the application on port 6000.
I have just removed the port from the below command and it's working as expected. Or you can use port 5000.
dapr run --app-id tradebookingconsumer --app-port 6000 dotnet run
Correct Command: dapr run --app-id tradebookingconsumer dotnet run