@quickts/nestjs-amqp
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

nestjs-amqp

Installation

$ npm install @quickts/nestjs-amqp amqplib
$ npm install -D @types/amqplib

Usage

import { Publish, Consume, Publisher, AfterPublisherInit } from "@quickts/nestjs-redis";

@Injectable()
class OtherService implements AfterPublisherInit {
    @Publish("some_exchange")
    publish: Publisher;

    afterPublisherInit() {
        // do some ....
        this.publish("haha");
    }

    @Consume("some_exchange", "some_queue")
    onMessage(msg: any) {
        console.log(msg); // haha
    }
}

Package Sidebar

Install

npm i @quickts/nestjs-amqp

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

425 kB

Total Files

25

Last publish

Collaborators

  • quickts