grpcq
v0.0.4
Published
gRPC Queue for managed backends.
Downloads
4
Readme
Features
- [ ] Amazon SQS backend support.
- [ ] Google Cloud Pub/Sub backend support.
- [ ] bull backend support.
- [x] gRPC client support. (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)
- [x] Delayed jobs.
- [x] Schedule and repeat jobs.
- [x] Retries.
- [x] View messages on-the-fly.
- [x] Job completion acknowledgement.
- [ ] Fully-managed hosting providers.
- [ ] UI.
- [ ] Event-driven API Guide.
Usage
Install package from npm install grpcq --save
or yarn add grpcq
.
const grpcq = require('grpcq')
grpcq.subscribe({
name: 'find reservation in every 5m',
type: 'sqs',
})
.on('message', (message) => {
console.log('[client] got message', message)
})
.on('error', (error) => {
console.log('[client] got error', error)
})
let receipt = await grpcq.publish({
name: 'find reservation in every 5m',
type: 'sqs',
data: 'any data',
repeat: '5m'
})
Documentation
Tests
Use mocha, chai assert.
For debug export DEBUG=grpcq*
npm test -- --grep="grpcq client"
npm test -- --grep="local require"
npm test -- --grep="ping pong with memory backend"
npm test -- --grep="kue driver ping pong"
npm test -- --grep="grpcq server"
npm test -- --grep="local createServer without opt"
npm test -- --grep="local createServer with invalid backend"
npm test -- --grep="local createServer with memory backend"
npm test -- --grep="createServer fail to auth"