@ifextech/message-broker-wrappers
v1.0.4
Published
A reusable package for the simple use of message brokers
Downloads
3
Readme
How to user the package?
Create a simple Publisher
import { Brokers } from '@ifextech/message-broker-wrappers';
const nats = new Brokers.Nats()
nats.connect({ host: /* Your host here */ })
.then(() => {
nats.publish('to', { payload: {} }, () => /* Your logic here */)
})
Create a simple Subscriber
import { Brokers } from '@ifextech/message-broker-wrappers';
const nats = new Brokers.Nats()
nats.connect({ host: /* Your host here */ })
.then(() => {
nats.subscribe('to', () => /* Your logic here */)
})