2.2305.0 • Published 2 years ago
@councilbox/liebre v2.2305.0
horus-liebre
Usage
import RabbitStore from 'liebre';
const config = {
user: '****',
password: '****',
host: '***.***.***.***',
port: *****,
PREFIX: ,
EXCHANGE: 'v1',
EXCHANGE_TYPE: 'direct',
ERRORS: 'errors'
prefix: 'horus.liebre',
exchange:'v1',
errorExchange: 'errors',
exchangeType: 'direct',
maxRetries: 15,
sleepSecondsOnRetry: 5,
autoAck: false,
prefetch: process.env.RABBITMQ_CHANNEL_PREFETCH || 20,
};
const PROCESSING_QUEUES = [
'email.send.one',
'email.send.many',
'track.store.mailgun',
'evidence.create',
'evidence.create.email',
'evidence.create.track'
];
async function run() {
const rabbitStore = new RabbitStore(config);
await rabbitStore.connectRabbitMq();
await rabbitStore.createQueue({ queueName });
console.log('CONNNECTED');
const callback = msg => {
console.log(`- Received ${JSON.stringify(msg)}`);
console.log('sending one');
};
const producer = new Producer(rabbitStore);
const consumer = new Consumer(rabbitStore, queueName);
producer.publish(queueName, { msg: 'Hello Liebre!' }, '1');
consumer.consume(queueName, callback);
}
run().then(() => {
console.log('END');
});
2.2305.0
2 years ago
2.2303.3
2 years ago
2.2304.0
2 years ago
2.2303.2
2 years ago
2.2303.1
2 years ago
2.2303.0
2 years ago
2.2302.0
2 years ago
2.2301.0
2 years ago
1.2209.2
3 years ago
1.2209.0
3 years ago
1.2209.1
3 years ago
0.0.15
3 years ago
0.0.16
3 years ago
0.0.17
3 years ago
0.0.10
3 years ago
0.0.11
3 years ago
0.0.12
3 years ago
0.0.13
3 years ago
0.0.14
3 years ago
1.2207.4
3 years ago
1.2207.5
3 years ago
1.2207.2
3 years ago
1.2207.3
3 years ago
1.2207.0
3 years ago
1.2207.1
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago
0.0.0
3 years ago