nestjs-event-store-cqrs
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

NestJS Kafka Event Store CQRS

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

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 {}

FULL EXAMPLE

Package Sidebar

Install

npm i nestjs-event-store-cqrs

Weekly Downloads

16

Version

2.0.1

License

ISC

Unpacked Size

27.5 kB

Total Files

28

Last publish

Collaborators

  • woodrow