1.0.3 • Published 5 years ago

mongodb-queue-ds v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

mongodb-queue-ds

NPM

This repo is a fork of the very useful mongodb-queue done by Andrew Chilton available at https://github.com/chilts/mongodb-queue

To learn how to use this check official docs and more information check out his repo.

Below is only docs for the methods I've added.

It should be without bugs but use it at your own risk or contact me.

Operations

.failed()

Returns the total number of messages that exceed max retries.

queue.failed((err, count) => {
    console.log('This queue has %d failed messages', count)
})

.bulkGet()

Returns an array with multiple messages from queue.

Use options multiple: true, bulkLimit: 10 where bulkLimit is the number of messages you want to retrieve from the queue.

queue.bulkGet({ visibility: visibility, multiple: true, bulkLimit: 10 }(err, msgs) => {
    console.log(msgs)
})

Credits

Andrew Chilton
https://github.com/chilts 

Fork author

Daniel Santos
https://github.com/danielrmsantos/
danielrmsantos@gmail.com

License

MIT - http://chilts.mit-license.org/2014/