-
Notifications
You must be signed in to change notification settings - Fork 2
WorkerFactory
Rami edited this page Nov 3, 2019
·
8 revisions
Create new worker
Params
- worker_type: SQS, RabbitMQ - TBD
const workerFactory = require('queue-router').workerFactory;
// workerFactory.Types.SQS
// workerFactory.Types.RabbitMQ- router: route table
const Router = require('queue-router').Router;
const router = new Router();
// ...- config: queue configuration
- SQS Config
{
"queue": { // object, required
"aws": { // object, required
"credentials": { // object, optional
"region": "", // string, optional, (default from env AWS_REGION)
"accessKeyId": "", // string, optional, (default from env AWS_ACCESS_KEY_ID)
"secretAccessKey": "", // string, optional, (default from env secretAccessKey)
},
"batchSize": "", //int, optional, (size of batch, default 10)
"queueUrl": "", //string, required, (url to sqs)
}