broker-proxy-rebbitmq
v1.0.7
Published
simple proxy
Downloads
3
Readme
Example
Producer
- chenal - docService.start
- message - '[*] Service start ' + new Date().toJSON()
const el = new BrokerProxy({ host: 'localhost' })
await el.connect()
await el.createChannel('docService.start');
el.emit('docService.start','[*] Service start ' + new Date().toJSON());
Consumer
- callback - (msg) => { console.log(msg) }
const el = new BrokerProxy({ host: 'localhost' })
await el.connect()
await el.createChannel('docService.start');
el.on('docService.start').subscribe((msg) => { console.log(msg) });
subscribe - not an "Observer"