MSMQ app architecture question

The business needs to send a customer some or all of the paperwork via email. They want to be able to do this from their existing web application. I've built out all the necessary stuff to handle sending paperwork on one of our rest services, separate from the client app. So the client app (old aspx page) sends an ajax request to the rest api(webapi 2.2) to kick everything off. I noticed straight away that the requests would take a long time to resolve (~30sec) if the customer had a lot of paperwork, so I've changed the rest method on the controller to be async.

This whole weekend I've been thinking that this would be a better fit for MSMQ: the client sends the ajax post, the server gets it and adds a message to the queue. The downside is that I'll need to block at least one thread per server (20 in the load balancer) to listen for new messages.

What's the best approach? Is MSMQ viable in a load-balanced environment?

by justShipIt_LOL via /r/csharp

Leave a Reply