{"_id":"@djereg/nestjs-rabbitmq","_rev":"4-e31ba0ce5ca417f1ba03acd47a86f2bb","name":"@djereg/nestjs-rabbitmq","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@djereg/nestjs-rabbitmq","version":"0.1.0","description":"RabbitMQ module for NestJS","author":{"name":"Györg Norbert"},"license":"MTI","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rimraf dist && tsc","lint":"eslint src/**/*.ts","prepack":"npm run build"},"dependencies":{"@golevelup/nestjs-rabbitmq":"^5.2.0","amqplib":"^0.10.4","json-rpc-2.0":"^1.7.0","lodash":"^4.17.21"},"peerDependencies":{"@nestjs/common":"^10.0.0","@nestjs/config":"^3.2.2","@nestjs/core":"^10.0.0","@nestjs/event-emitter":"^2.0.4","reflect-metadata":"^0.2.0","rxjs":"^7.8.1"},"devDependencies":{"@nestjs/cli":"^10.0.0","@nestjs/schematics":"^10.0.0","@nestjs/testing":"^10.0.0","@types/amqplib":"^0.10.5","@types/express":"^4.17.17","@types/jest":"^29.5.2","@types/lodash":"^4.17.0","@types/node":"^20.3.1","@types/supertest":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.42.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.5.0","prettier":"^3.0.0","rimraf":"^5.0.1","source-map-support":"^0.5.21","supertest":"^6.3.3","ts-jest":"^29.1.0","ts-loader":"^9.4.3","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.1.3"},"_id":"@djereg/nestjs-rabbitmq@0.1.0","gitHead":"f93ee3037da50978f97c168631d3cd1cd9f4f483","_nodeVersion":"21.7.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-TfA37UjzL5/5aBmflfLPB/iF5rOPK++9sja2C+t4Ct7xnliA7IAEvFpcpm8YhUfOfmt7P3DJ4rPtE80WLTok0w==","shasum":"cf5ba737de33e4b5a00465184757d8f2a7512050","tarball":"https://registry.npmjs.org/@djereg/nestjs-rabbitmq/-/nestjs-rabbitmq-0.1.0.tgz","fileCount":59,"unpackedSize":64273,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDj5UflDauM5E7o9P0Rs91txZcKmU2b9R676OMhfadgYAIhAPYIB6Yh346Ac01H5Al6Gvu8jGS1fts3ogZ18SXzp25C"}]},"_npmUser":{"name":"djereg","email":"djereg@gmail.com"},"directories":{},"maintainers":[{"name":"djereg","email":"djereg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-rabbitmq_0.1.0_1714656675781_0.5323862115288946"},"_hasShrinkwrap":false},"0.2.0":{"name":"@djereg/nestjs-rabbitmq","version":"0.2.0","description":"RabbitMQ module for NestJS","author":{"name":"Györg Norbert"},"license":"MTI","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rimraf dist && tsc","lint":"eslint src/**/*.ts","prepack":"npm run build"},"dependencies":{"@golevelup/nestjs-rabbitmq":"^5.2.0","amqplib":"^0.10.4","json-rpc-2.0":"^1.7.0","lodash":"^4.17.21"},"peerDependencies":{"@nestjs/common":"^10.0.0","@nestjs/config":"^3.2.2","@nestjs/core":"^10.0.0","@nestjs/event-emitter":"^2.0.4","reflect-metadata":"^0.2.0","rxjs":"^7.8.1"},"devDependencies":{"@nestjs/cli":"^10.0.0","@nestjs/schematics":"^10.0.0","@nestjs/testing":"^10.0.0","@types/amqplib":"^0.10.5","@types/express":"^4.17.17","@types/jest":"^29.5.2","@types/lodash":"^4.17.0","@types/node":"^20.3.1","@types/supertest":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.42.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.5.0","prettier":"^3.0.0","rimraf":"^5.0.1","source-map-support":"^0.5.21","supertest":"^6.3.3","ts-jest":"^29.1.0","ts-loader":"^9.4.3","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.1.3"},"_id":"@djereg/nestjs-rabbitmq@0.2.0","gitHead":"0755af82c4959708d0d706adbbe6ef528eef739d","_nodeVersion":"21.7.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-WICOZqMx0jXEW4U+rMNaZ8MGqlUNVvEVVkhVVRLaZtXdBqG3PcjvQZfNOQlXsLpppdf3eR88bLjb/tmWtlYRKg==","shasum":"75af48867bc382546346ebf02ff381d0aa2e714d","tarball":"https://registry.npmjs.org/@djereg/nestjs-rabbitmq/-/nestjs-rabbitmq-0.2.0.tgz","fileCount":59,"unpackedSize":64438,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfVCSWoMIU2Ix1ZGYUUblTgnGHoF8DHwjX1YVM5Cf2uAiB4LTtc/F1SoEjL7ljqoiI+C7HMHBII/S4x6DZ+9b7bhg=="}]},"_npmUser":{"name":"djereg","email":"djereg@gmail.com"},"directories":{},"maintainers":[{"name":"djereg","email":"djereg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-rabbitmq_0.2.0_1714656764702_0.8285594431431353"},"_hasShrinkwrap":false},"0.3.0":{"name":"@djereg/nestjs-rabbitmq","version":"0.3.0","description":"RabbitMQ module for NestJS","author":{"name":"Györg Norbert"},"license":"MTI","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rimraf dist && tsc","lint":"eslint src/**/*.ts","prepack":"npm run build"},"dependencies":{"@golevelup/nestjs-rabbitmq":"^5.2.0","amqplib":"^0.10.4","json-rpc-2.0":"^1.7.0","lodash":"^4.17.21"},"peerDependencies":{"@nestjs/common":"^10.0.0","@nestjs/config":"^3.2.2","@nestjs/core":"^10.0.0","@nestjs/event-emitter":"^2.0.4","reflect-metadata":"^0.2.0","rxjs":"^7.8.1"},"devDependencies":{"@nestjs/cli":"^10.0.0","@nestjs/schematics":"^10.0.0","@nestjs/testing":"^10.0.0","@types/amqplib":"^0.10.5","@types/express":"^4.17.17","@types/jest":"^29.5.2","@types/lodash":"^4.17.0","@types/node":"^20.3.1","@types/supertest":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.42.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.5.0","prettier":"^3.0.0","rimraf":"^5.0.1","source-map-support":"^0.5.21","supertest":"^6.3.3","ts-jest":"^29.1.0","ts-loader":"^9.4.3","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.1.3"},"_id":"@djereg/nestjs-rabbitmq@0.3.0","gitHead":"85e78d7f8f1ea6738d1d6ce51f7601f86b23a005","_nodeVersion":"21.7.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-hmn1EpJ2Yhd33VKYdQyJwcPodGrpoTHGObRtf3nCIrnk8rcp9VHbQP63N3NxS87Hebm8n3Erby83n06YQzUKjQ==","shasum":"0a86e62569fc97138ba8c62dd4b5a95427b399ac","tarball":"https://registry.npmjs.org/@djereg/nestjs-rabbitmq/-/nestjs-rabbitmq-0.3.0.tgz","fileCount":59,"unpackedSize":64734,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRdL5rSxDRHrjzv5PUclC1/Cdnnp/z5GOWJ1y91+KC7wIgGhc/ElnDlYv/dzNLgOYuvz+tMJKvTeq0qz0bYVfP12g="}]},"_npmUser":{"name":"djereg","email":"djereg@gmail.com"},"directories":{},"maintainers":[{"name":"djereg","email":"djereg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-rabbitmq_0.3.0_1714656876825_0.26602259561792785"},"_hasShrinkwrap":false},"0.4.0":{"name":"@djereg/nestjs-rabbitmq","version":"0.4.0","description":"RabbitMQ module for NestJS","author":{"name":"Györg Norbert"},"license":"MTI","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"rimraf dist && tsc","lint":"eslint src/**/*.ts","prepack":"npm run build"},"dependencies":{"@golevelup/nestjs-rabbitmq":"^5.2.0","amqplib":"^0.10.4","json-rpc-2.0":"^1.7.0","lodash":"^4.17.21"},"peerDependencies":{"@nestjs/common":"^10.0.0","@nestjs/config":"^3.2.2","@nestjs/core":"^10.0.0","@nestjs/event-emitter":"^2.0.4","reflect-metadata":"^0.2.0","rxjs":"^7.8.1"},"devDependencies":{"@nestjs/cli":"^10.0.0","@nestjs/schematics":"^10.0.0","@nestjs/testing":"^10.0.0","@types/amqplib":"^0.10.5","@types/express":"^4.17.17","@types/jest":"^29.5.2","@types/lodash":"^4.17.0","@types/node":"^20.3.1","@types/supertest":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.42.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.5.0","prettier":"^3.0.0","rimraf":"^5.0.1","source-map-support":"^0.5.21","supertest":"^6.3.3","ts-jest":"^29.1.0","ts-loader":"^9.4.3","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.1.3"},"_id":"@djereg/nestjs-rabbitmq@0.4.0","gitHead":"175850529e8715a2ec3fd8d72f64c75ad6d1e8ca","_nodeVersion":"21.7.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-+YxuZZHjhWdA1SuhTllvkOhIjzQnhO7JRQT7RkuxdaiZjX5LGLQmbzBQ55GebvymbXVPZfAEUIcMboT6KvKfbQ==","shasum":"4da664892e6807e5af1145397efab962207cbc6f","tarball":"https://registry.npmjs.org/@djereg/nestjs-rabbitmq/-/nestjs-rabbitmq-0.4.0.tgz","fileCount":59,"unpackedSize":64811,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQPWUiigHgwhGlNBOPI7dNyOInOcboMcI9wJS/SQzHTAiEAxtXFUF5FusiHa9M/3PfVq3o6LpjPWeOBuCvCeN61OyE="}]},"_npmUser":{"name":"djereg","email":"djereg@gmail.com"},"directories":{},"maintainers":[{"name":"djereg","email":"djereg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-rabbitmq_0.4.0_1714656982631_0.8888313789631912"},"_hasShrinkwrap":false},"0.5.0":{"name":"@djereg/nestjs-rabbitmq","version":"0.5.0","description":"RabbitMQ module for NestJS","author":{"name":"Györg Norbert"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/djereg/nestjs-rabbitmq.git"},"keywords":["nestjs","rabbitmq"],"bugs":{"url":"https://github.com/djereg/nestjs-rabbitmq/issues"},"homepage":"https://github.com/djereg/nestjs-rabbitmq#readme","scripts":{"build":"rimraf dist && tsc","lint":"eslint src/**/*.ts","prepack":"npm run build"},"dependencies":{"@golevelup/nestjs-rabbitmq":"^5.2.0","amqplib":"^0.10.4","json-rpc-2.0":"^1.7.0","lodash":"^4.17.21"},"peerDependencies":{"@nestjs/common":"^10.0.0","@nestjs/config":"^3.2.2","@nestjs/core":"^10.0.0","@nestjs/event-emitter":"^2.0.4","reflect-metadata":"^0.2.0","rxjs":"^7.8.1"},"devDependencies":{"@nestjs/cli":"^10.0.0","@nestjs/schematics":"^10.0.0","@nestjs/testing":"^10.0.0","@types/amqplib":"^0.10.5","@types/express":"^4.17.17","@types/jest":"^29.5.2","@types/lodash":"^4.17.0","@types/node":"^20.3.1","@types/supertest":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.42.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.5.0","prettier":"^3.0.0","rimraf":"^5.0.1","source-map-support":"^0.5.21","supertest":"^6.3.3","ts-jest":"^29.1.0","ts-loader":"^9.4.3","ts-node":"^10.9.1","tsconfig-paths":"^4.2.0","typescript":"^5.1.3"},"_id":"@djereg/nestjs-rabbitmq@0.5.0","gitHead":"4228db57966c193cd2c310a9cbc5e23bd1756705","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-395cXtSRRLCkcPCk46g6qO8vra5VaLYgYv+9FchI3SkVNqE7rE4a99TXficHsSwh4SKI7tfHgbrHb50QQOOmyA==","shasum":"d8016331859c13317199b1d993d959f48d712c1c","tarball":"https://registry.npmjs.org/@djereg/nestjs-rabbitmq/-/nestjs-rabbitmq-0.5.0.tgz","fileCount":59,"unpackedSize":71328,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsL/UND66m9fw8KxqgiLB53Ojd15ic5BEefTM7SAZGUAIgOHIOtfMfNnbNY+SIt2/IMGsEUd8V+GhZb1ELYAy/gDk="}]},"_npmUser":{"name":"djereg","email":"djereg@gmail.com"},"directories":{},"maintainers":[{"name":"djereg","email":"djereg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-rabbitmq_0.5.0_1714691020494_0.8954293878031412"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-02T13:31:15.637Z","0.1.0":"2024-05-02T13:31:15.920Z","modified":"2024-05-02T23:03:40.891Z","0.2.0":"2024-05-02T13:32:44.829Z","0.3.0":"2024-05-02T13:34:37.001Z","0.4.0":"2024-05-02T13:36:22.782Z","0.5.0":"2024-05-02T23:03:40.680Z"},"maintainers":[{"name":"djereg","email":"djereg@gmail.com"}],"description":"RabbitMQ module for NestJS","author":{"name":"Györg Norbert"},"license":"MIT","readme":"# NestJS RabbitMQ\n\n**THIS PACKAGE IS PRIMARILY INTENDED FOR INTERNAL/PRIVATE USE IN OWN PROJECTS.\nIF IT MEETS YOUR NEEDS, FEEL FREE TO USE IT, BUT IN CASE OF ANY MODIFICATION REQUESTS, I WILL CONSIDER MY OWN NEEDS FIRST.**\n\nThe package is part of the [rabbitmq-multiverse](https://github.com/djereg/rabbitmq-multiverse).\n\n# Table of Contents\n\n- [Description](#description)\n- [Motivation](#motivation)\n- [Usage](#usage)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n  - [Module Initialization](#module-initialization)\n- [Events](#events)\n  - [Emitting events](#emitting-events)\n  - [Listening to events](#listening-to-events)\n  - [Subscribing to events](#subscribing-to-events)\n- [RPC](#rpc)\n  - [Setup](#setup)\n  - [Calling remote procedures](#calling-remote-procedures)\n  - [Registering remote procedures](#registering-remote-procedures)\n  - [Notification](#notification)\n  - [Batch Call](#batch-call)\n- [Lifecycle events](#lifecycle-events)\n  - [MessagePublishing](#messagepublishing)\n  - [MessageProcessing](#messageprocessing)\n  - [MessageProcessed](#messageprocessed)\n- [License](#license)\n\n# Description\n\nThe package is an intermediate layer between NestJS and RabbitMQ. It provides the possibility of synchronous and asynchronous communication between different microservices.\n\n# Motivation\n\nSince the microservice architecture has become very popular, I needed a library that provides the possibility of communicating with services written in different programming languages or frameworks.\n\nUsing the [@golevelup/nestjs-rabbitmq](https://www.npmjs.com/package/@golevelup/nestjs-rabbitmq) package under the hood, which is a great package, but I needed some customizations.\n\n# Usage\n\n## Installation\n\n```bash\n$ npm install --save @djereg/nestjs-rabbitmq\n```\n\n## Configuration\n\nThe RabbitMQ connection configuration is done through environment variables.\n\n```dotenv\nRABBITMQ_HOST=localhost\nRABBITMQ_PORT=5672\nRABBITMQ_USERNAME=guest\nRABBITMQ_PASSWORD=guest\nRABBITMQ_VHOST=/\nRABBITMQ_QUEUE=\nRABBITMQ_EXCHANGE=\n```\n\n## Module Initialization\n\n```typescript\nimport {RabbitMQModule} from \"@djereg/nestjs-rabbitmq\";\n\n@Module({\n  imports: [\n    RabbitMQModule.forRoot(),\n  ],\n})\nexport class AppModule {\n}\n```\n\n# Events\n\nProvides an event based asynchronous communication between services.\n\nWorks very similarly to the [NestJS event system](https://docs.nestjs.com/techniques/events), as it wraps it. When an event-type message is received, an event is emitted with the help of the built-in event emitter, and the methods listening to the\nevent perform an action.\n\n## Emitting events\n\n```typescript\nimport {EventEmitter} from '@djereg/nestjs-rabbitmq';\n\nexport class UserService {\n\n  constructor(\n    private readonly eventEmitter: EventEmitter\n  ) {\n    //\n  }\n\n  public async createUser(user: User) {\n    // Create user logic\n\n    this.eventEmitter.emit('user.created', user);\n  }\n}\n```\n\n## Listening to events\n\n```typescript\nimport {OnMessageEvent} from '@djereg/nestjs-rabbitmq';\n\nexport class NotificationService {\n\n  @OnMessageEvent('user.created')\n  public async handleUserCreated(user: User) {\n    // Send notification logic\n  }\n}\n```\n\nYou can listen to multiple events by adding multiple decorators.\n\n```typescript\n@OnMessageEvent('user.created')\n@OnMessageEvent('user.updated')\nasync function handler() {\n    // Do something\n}\n```\n\n## Subscribing to events\n\nAt startup the exchange and queue will be created automatically, and the events listening to will be registered as routing keys.\n\n# RPC\n\nProvides the possibility of synchronous like asynchronous communication between services.\n\nUses the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) protocol for communication.\n\n## Setup\n\nBefore using the client, you need to define the client in the module.\n\n```typescript\nimport {RabbitMQModule} from \"@djereg/nestjs-rabbitmq\";\n\n@Module({\n  imports: [\n    RabbitMQModule.forRoot({\n      client: [{\n        queue: 'users'\n      }]\n    }),\n  ],\n})\n```\n\nAfter initialization, you can use the client in a service.\n\n## Calling remote procedures\n\nInject the previously defined client into a service and call the remote procedures like the example below.\n\n```typescript\nimport {Client, InjectClient} from '@djereg/nestjs-rabbitmq';\nimport {Injectable} from \"@nestjs/common\";\n\n@Injectable()\nclass UserService {\n\n  constructor(\n    @InjectClient('users')\n    private readonly users: Client\n  ) {\n    //\n  }\n\n  public async createUser(dto: UserCreateDto) {\n    const user = this.users.call('create', dto);\n    // Do something with the user data returned\n  }\n}\n```\n\n## Registering remote procedures\n\nCreate a service and add the `@RemoteProcedure` decorator to the method you want to expose.\n\nAdding the decorator without parameters will use the method name as the remote procedure name.\nSpecifying the name explicitly will use the specified name.\n\n```typescript\nimport {RemoteProcedure} from '@djereg/nestjs-rabbitmq';\n\nclass UserService {\n\n  @RemoteProcedure()\n  create(dto: CreateUserDto) {\n    // Create a user and return it\n  }\n\n  // Also you can specify the method name explicitly\n  @RemoteProcedure('delete')\n  deleteUserMethod(id: number) {\n    // Delete the user somehow\n  }\n}\n\n```\n\n## Notification\n\nAn asynchronous call to the method of service which does not return a result.\n\n```typescript\nimport {Client, InjectClient} from '@djereg/nestjs-rabbitmq';\n\nclass UserController {\n\n  constructor(\n    @InjectClient('notifications')\n    private readonly notifications: Client\n  ) {\n    //\n  }\n\n  public async createUser(dto: UserCreateDto) {\n    // Create the user and notify the notification service\n    this.notifications.notify('userCreated', user);\n  }\n}\n```\n\n## Batch Call\n\nA grouped call to multiple methods of service. Returns a list of results.\n\n```typescript\nimport {Client, InjectClient} from '@djereg/nestjs-rabbitmq';\nimport {Injectable} from \"@nestjs/common\";\n\n@Injectable()\nclass Mathervice {\n\n  constructor(\n    @InjectClient('math')\n    private readonly math: Client\n  ) {\n    //\n  }\n\n  public async batchCall() {\n\n    const batch = this.math.batch();\n\n    batch.call('add', {a: 1, b: 2});\n    batch.call('subtract', {a: 5, b: 3});\n    batch.call('multiply', {a: 2, b: 3});\n    batch.call('divide', {a: 6, b: 2});\n\n    // The notification method can also be used in the\n    // batch, but it will not return a result\n    batch.notify('something', {a: 1, b: 2});\n    batch.notify('anything', {a: 1, b: 2});\n\n    const results = await batch.send();\n\n    // Do something with the results\n  }\n}\n```\n\n# Lifecycle events\n\nThe package emits events during the message processing.\nYou can listen to these events and perform some actions.\n\nAdd the corresponding decorator to the method you want to execute.\n\n## MessagePublishing\n\nEmitted before the message is published to the exchange.\n\n```typescript\nimport {OnMessagePublishing, MessagePublishingEvent} from '@djereg/nestjs-rabbitmq';\n\nclass UserService {\n\n  @OnMessagePublishing()\n  async handlePublishing(event: MessagePublishingEvent) {\n    // Do something with the event\n  }\n}\n```\n\n## MessageProcessing\n\nEmitted before the message is processed.\n\n```typescript\nimport {OnMessageProcessing, MessageProcessingEvent} from '@djereg/nestjs-rabbitmq';\n\nclass UserService {\n\n  @OnMessageProcessing()\n  async handleProcessing(event: MessageProcessingEvent) {\n    // Do something with the event\n  }\n}\n```\n\n## MessageProcessed\n\nEmitted after the message is processed.\n\n```typescript\nimport {OnMessageProcessed, MessageProcessedEvent} from '@djereg/nestjs-rabbitmq';\n\nclass UserService {\n\n  @OnMessageProcessed()\n  async handleProcessed(event: MessageProcessedEvent) {\n    // Do something with the event\n  }\n}\n```\n\n# License\n\n[MIT licensed](LICENSE)\n","readmeFilename":"README.md","homepage":"https://github.com/djereg/nestjs-rabbitmq#readme","keywords":["nestjs","rabbitmq"],"repository":{"type":"git","url":"git+https://github.com/djereg/nestjs-rabbitmq.git"},"bugs":{"url":"https://github.com/djereg/nestjs-rabbitmq/issues"}}