A collection of message broker implementations. Each implementation must conform the unified interface, which defines a single client who acts as both publisher and subscriber.
npm install -s @luckbox/mq-clients
npm run test
import { RabbitMQClient } from '@luckbox/mq-clients';
const client = new RabbitMQClient({
amqp: {},
exchange: {
type: 'fanout',
},
retryTimeout: 1000,
debug: true,
});
client.connect().then(() => {
client.subscribe('nsp', console.log);
client.publish('nsp', 'data');
});