inspiration from MongoMQ