Processing jobs from capped collection until interrupted

14 views
Skip to first unread message

Erik Allik

unread,
Jan 13, 2015, 8:15:05 AM1/13/15
to reacti...@googlegroups.com
(I've posted this question also on StackOverflow: http://stackoverflow.com/questions/27922855/processing-jobs-from-db-indefinitely-using-reactivemongo)

Basically my question is, in "normal", blocking method (as opposed to actor or future), how do I process items from a capped collection obtain using a tailable/awaitdata cursor indefinitely? I'm using `cursor.enumerate() |>>> Iteratee.foreach { item => ...}` but it never actually seems to await for new data from the DB. In fact, it exits immediately even if there are jobs in the DB.

I do ensure the collection is capped.

Best regards,
Erik Allik

Reply all
Reply to author
Forward
0 new messages