Skip to content
/ ksqldb Public

KsqlDB Client module for Nest framework (node.js)

License

Notifications You must be signed in to change notification settings

pirumu/ksqldb

Repository files navigation

KsqlDB Client for Nestjs logo

Install

# npm
npm install @nattogo/ksqldb
# yarn
yarn add @nattogo/ksqldb

Usage

// app.module.ts
import { KsqlDBModule } from '@nattogo/ksqldb';

@Module({
  imports: [
    KsqlDBModule.register({
      url: 'http://localhost:8088',
      timeout: 3000,
    }),
  ],
})
export class AppModule {}
//app.service.ts
import { KsqldbService } from '@nattogo/ksqldb';
import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
  constructor(private readonly ksqldbService: KsqldbService) {
  }

   pushQuery() {
    this.ksqldbService.pushQuery('SELECT * FROM STREAM EMIT CHANGES;').subscribe({
      next: (data) => console.log(data),
    });
  }
}

About

KsqlDB Client module for Nest framework (node.js)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published