Coming soon...
- Robust design based on Redis Streams
- Highly memory efficient
- Automatic environment separation
- Automatic recovery from process crashes
- Automatic queue trimming by count, time, or memory usage
npm install rediqueue
We welcome all types of contributions, either code fixes, new features or doc improvements. Code formatting is enforced by prettier. For commits please follow conventional commits convention. All code must pass lint rules and test suites before it can be merged into develop.
import RediQueue from 'rediqueue'
// Create a queue
const notificationQueue = new RediQueue('notifications', {
redis: {
host: '127.0.0.1',
port: 6379
}
})
// Add a job to the queue
notificationQueue.add({
email: '[email protected]'
})
// Process jobs
notificationQueue.process((job) => {
const { data } = job
return sendEmailFunction(data.email) {
...
}
})
Coming soon...
RediQueue aims for at-least-once strategy. If a consumer fails or is killed while processing a job, a job could be processed more than once.