In my opinion, asynchronous is a suitable way. A few things to consider:
- Do you have several customers accessing this service at any time?
- How often does this process take place?
Implementing asynchronous methods requires a bit more effort. But I guarantee that in the end you will be much happier with the result. Firstly, you do not need to control the flow. The main problem can only be the volatility of the data in the que (i.e. race / deadlock conditions).
source
share