Reputation: 150
I receive a big amount of data to my web api service that takes a while to process (Parse, process data, put in DB, etc).
The problem I'm having is that the processing is not always finished when the next chunk of data comes. I don't want to process the data simultaneously but rather wait for the first call to finish before processing the next.
I've looked into RabbitMQ and other solutions similar - the problem is that I don't have a process running checking the queue at all times "while(true)" style.
Any suggestions ?
Upvotes: 0
Views: 1339
Reputation: 13138
You can't handle a queue without a running process. If you make your API call wait untill the processing slot is ready you'll get timeouts.
You must use a solution like RabbitMQ and a worker process that process incoming data. Nothing prevents this process from pushing result using SignalR.
Upvotes: 2