chilts / mongodb-queue

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

Add 'Add if missing' functionality. Make id seperate from mongo document id. #20

Closed samgurtman-zz closed 6 years ago

samgurtman-zz commented 7 years ago

I needed the ability to add a message only if a message with the previous id does not exist. This allows some distributed use cases such as a ChronJob to be implemented on top of this library. In adding this functionality I realised that having a separate id field in the document would allow us to have cancel functionality while maintaining backwards compatibility with previous versions.

samgurtman-zz commented 7 years ago

If this PR meets your approval I would withdraw the other PR I created.