2.2.1 • Published 1 month ago
@pager/minion-army v2.2.1
minion-army
Microservice Framework for RabbitMQ Workers
usage
const Army = require('@pager/minion-army');
const Joi = require('joi');
// Refer to lib/schema.js to see valid options
const manifest = {
connection: { // optional, if not provided will default to a rabbit connection to local host
rabbitUrl: 'amqp://localhost'
},
defaults: { // default values that apply for all workers
exchangeName: 'my-exchange-name'
},
workers: [
{
handler: (message) => console.log('my job is to log this', message),
config: { // same config as expected by minions
name: 'jobs.logging',
key: 'events.something.happened'
},
validate: Joi.object({ // set a joi schema to validate handler input (optional)
id: Joi.string().required()
})
},
{
handler: (message) => true,
config: {
name: `jobs.trueing`,
key: `events.something.happened`
}
}
]
};
const army = Army(manifest);
army.start(); // if you provide defaults.autoStart = true this is not needed
2.2.1
1 month ago
2.2.0
12 months ago
2.1.0
12 months ago
2.3.0-0
12 months ago
2.0.0
4 years ago
1.3.0
4 years ago
1.2.0
4 years ago
1.1.8
4 years ago
1.1.7
4 years ago
1.1.6
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.7-rc.0
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.3-beta.1
4 years ago
1.0.3-beta.0
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
5 years ago
0.6.1
5 years ago
0.6.0
5 years ago
0.5.1
5 years ago
0.5.0
5 years ago
0.4.1
5 years ago
0.3.1
5 years ago
0.3.0
5 years ago
0.2.0
6 years ago
0.1.0
6 years ago