Redis
Redis can be used as a message transport by installing the @node-ts/bus-redis package. This will configure Redis to use lists as de-facto message queues and route messages according to your application handlers.
Installation
Install the @node-ts/bus-redis package
npm install @node-ts/bus-redisConfigure the Redis transport and provide it to the bus configuration
import { Bus } from '@node-ts/bus-core'
import { RedisTransport, RedisTransportConfiguration } from '@node-ts/bus-redis'
const redisTransportConfiguration: RedisTransportConfiguration = {
  queueName: 'accounts-application-queue',
  connectionString: 'redis://127.0.0.1:6379',
  maxRetries: 3
}
const redisTransport = new RedisTransport(redisTransportConfiguration)
await Bus
  .configure()
  .withTransport(redisTransport)
  .initialize()Last updated
Was this helpful?