voox-nestjs-amqp
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

nestjs-amqp

Installation

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

Usage

import { Publish, Consume, Publisher, AfterPublisherInit } from "voox-nestjs-amqp";

@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 voox-nestjs-amqp

Weekly Downloads

2

Version

1.2.1

License

MIT

Unpacked Size

427 kB

Total Files

25

Last publish

Collaborators

  • voox