0.0.10 • Published 1 year ago
@n0tify/client v0.0.10
@n0tify/client
- connects to
socket
,RabbitMQ
,Kafka
,redis
or other exchange service - dispatches message to multiple channels
Client usage
import { Client } from '@n0tify/client';
...
const transport = ...;
const emailChannel = ...;
const client = new Client({
transport,
channels: [
emailChannel
]
});
await client.connect();
await client.send({
pattern: 'user.create',
channels: [
{
channel: 'email',
data: ...
}
],
context: {
username: 'Random username'
}
});
Further information
CLICK HERE for information about channels and transports