2.2305.0 • Published 1 year ago

@councilbox/liebre v2.2305.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

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

1 year ago

2.2303.3

1 year ago

2.2304.0

1 year ago

2.2303.2

1 year ago

2.2303.1

1 year ago

2.2303.0

1 year ago

2.2302.0

1 year ago

2.2301.0

1 year ago

1.2209.2

2 years ago

1.2209.0

2 years ago

1.2209.1

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

1.2207.4

2 years ago

1.2207.5

2 years ago

1.2207.2

2 years ago

1.2207.3

2 years ago

1.2207.0

2 years ago

1.2207.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago