(asked on mongo-user discussion group https://groups.google.com/d/topic/mongodb-user/i1ge4bNiMgM/discussion)
Hi, i'd like to use MongoDB as a message queue and thought about using a capped collection + tailable cursor for that purpose. I know that the tailable cursor can be used for accessing documents in the insertion order but
- can I use any sort order for the cursor?
- does a tailing cursor work with a filter query (to skip some documents I don't want to process)? If so, how does it handle insertion of new documents - will I be notified only if the new document matches the query criteria?
- Are tailing cursors fully supported by C# driver?
- I'd like my queue to guarantee single delivery - I mean if two clients try to read messages from the same collection they shouldn't be able to 'consume' the same message. I think this could be achieved with findAndModify, but how to do that with tailing cursor?
Thanks RG