You will probably want to change your architecture so that the HTTP response does not depend on the completion of processing during the wait period. It sounds as if you are not going to tell the user anything based on the calculation results, in any case, based on a question. There are various methods that you can use, but most of them involve writing the message to the queue, and then with a separate process, for example, with the Windows service monitor, which executes the queue and performs long work separately.
source
share