chilts / mongodb-queue

Message queues which uses MongoDB.
209 stars 91 forks source link

Add option to use `returnDocument` #41

Closed alecgibson closed 1 year ago

alecgibson commented 3 years ago

Fixes https://github.com/chilts/mongodb-queue/issues/38

The mongodb Node.js driver deprecated use of returnOriginal in favour of returnDocument in v3.6.

This non-breaking change allows consumers to opt in to using the newer returnDocument by setting an option on construction

var queue = mongoDbQueue(db, 'queue', { returnDocument : true })