How to set mongodb 'read concern' in a Meteor app?

In a Meteor app, how should the MongoDB read concern be set? I would like to set this flag on a case-by-case basis (not at the connection level).

I have been unable to answer this question using Google. A pointer to the appropriate documentation may be all I need.

‘Read concern’ is described here: https://docs.mongodb.com/manual/reference/read-concern/.

I don’t see anything like this in the Meteor docs: Collections | Meteor API Docs

Any help is appreciated.

L

You may find something useful with rawDatabase.

1 Like

Or with Mongo.Collection#rawCollection

Give it a test and let us know if it works

1 Like

We set readPreference in the MONGO_URL, so I would think that you could do the same with readConcern.

Our MONGO_URL looks like:

"mongodb://user:password@host1,host2/database?replicaSet=rsname&ssl=true&readPreference=primaryPreferred&authSource=admin"
2 Likes