nestjs-event-store-cqrs
v2.0.1
Published
NestJS CQRS event source module for KafkaJS
Downloads
76
Maintainers
Readme
Description
A lightweight KafkaJS event-store module for CQRS Nest framework (node.js). It requires @nestjs/cqrs
and kafkajs
Installation
$ npm install --save nestjs-event-store-cqrs
$ npm install --save kafkajs
Quick Start
import { Module } from '@nestjs/common';
import { CqrsModule } from '@nestjs/cqrs';
import { EventStoreModule } from 'nestjs-event-store-cqrs';
@Module({
imports: [
CqrsModule,
EventStoreModule.forRoot({
client: {
clientId: 'hero',
brokers: ['localhost:9092'],
},
consumer: {
groupId: 'hero-consumer',
},
events: [HeroKilledDragonEvent],
}),
]
})
export class AppModule {}