Redis Pub/Sub
Redis Pub/Sub implements the messaging system where the publishers sends the messages while the subscribers receive them.
Installation
$ yarn add redisOverview
import { createMicroservice, Transport } from '@marblejs/messaging';
const microservice = createMicroservice({
transport: Transport.REDIS
options: {
host: 'redis://127.0.0.1:6379',
channel: 'hello_channel',
},
// ...
});import { MessagingClient, createMicroservice, Transport } from '@marblejs/messaging';
const client = MessagingClient({
transport: Transport.REDIS
options: {
host: 'redis://127.0.0.1:6379',
channel: 'hello_channel',
},
// ...
});Last updated