1.2.1 • Published 1 year ago

voox-nestjs-amqp v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

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

1 year ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.8

4 years ago