I am considering using a NoSQL Document database as a messaging queue.
Here is why:
- I want a client to post a message (some serialized object) to the server and not have to wait for a synchronous response.
- I want to be able to pull messages off of the "queue" based on some criteria, which may be more sophisticated than just a priority level (I am working on a hosted web app, so I want to give all of my customers a fair amount of "computing time", and not let one customer hog all of the processing).
- I want the queue to be durable - if the server goes down I want any remaining messages to be handled when it comes back up.
So, I am considering using MongoDB or RavenDB as a message queue. The client can post the message object to a web service which writes it to the database. Then - the service doing the work can pull the various message types based on any criteria that may arise. I can create indexes around the scenarios to make it faster.
So - I am looking for someone to shoot a hole in this. Has anybody successfully done this? Has anybody tried this and failed in some way?