Last post Jan 20, 2020 06:05 AM by Khuram.Shahzad
Jan 20, 2020 04:10 AM|Rohan W|LINK
We are trying to design a Web application using ASP.net Core and RESTful WebAPI services hosted on Azure (AKS to be precise).
We want to make the UI / Business & Services de-coupled as possible so all requests will be routed via Azure Service Bus.
From what I understand, using service bus will make the application asynchronous. So my UI might trigger an service and forget about it.
This works for many scenarios, but in some I would like to get data back synchronously using the same pipeline. One way of doing this will be to keep pooling the Service Bus to check if response has arrived. But this does not seem to be an elegant solution.
Can you please direct us on how we can achieve this functionality ? Is there something in-build in the Azure Service Bus for this type of usage ?
I can summarize the requirement as bellow:
1. Request is sent to Azure Service Bus, and the application waits for the response.
2. Subscribed services receive the message
3. Service processes the request
4. Service sends the response to service bus
5. ServcieBus sends the the response to the same request which it receives
Jan 20, 2020 05:41 AM|Khuram.Shahzad|LINK
Jan 20, 2020 05:53 AM|Rohan W|LINK
Thanks for the feedback, The flow mentioned is exactly what I am looking for and the SessionID was the feature I had in my mind as well.
Unfortunately, I'm struggling with understand how can I implement this (from coding prospective). to be precise, I'm struggling with 2 of the steps in the link provided by you:
Also, once scenario where there might be a probelem is when I have multiple instances of the requester (i.e. 2 or more instances of web application)
Any help will be greatly appreciated if you can explain this.
Jan 20, 2020 06:05 AM|Khuram.Shahzad|LINK
Please have a look over here to get an idea of multiple concurrent session and message ordering: