{"_id":"@deadstone/nestjs-rabbitmq","_rev":"3-df924d710965b4f32e91c5581ddbfe0e","name":"@deadstone/nestjs-rabbitmq","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@deadstone/nestjs-rabbitmq","version":"1.0.0","author":{"name":"deadstone"},"license":"MIT","_id":"@deadstone/nestjs-rabbitmq@1.0.0","maintainers":[{"name":"deadst0ne","email":"deadstone@list.ru"}],"homepage":"https://github.com/DEADST0NE/nest-rabbitmq","bugs":{"url":"https://github.com/DEADST0NE/nest-rabbitmq/issues"},"dist":{"shasum":"622f366ebdb499279adf0ab6bc712945b69fc648","tarball":"https://registry.npmjs.org/@deadstone/nestjs-rabbitmq/-/nestjs-rabbitmq-1.0.0.tgz","fileCount":32,"integrity":"sha512-c703s3hgCD7C4NSprQOL3HHw21XqD6V8fOi/2C01NE85MyKxt6f0tAJekrHJYf/sBfcBa6Iffjlh0hM8jWt6GA==","signatures":[{"sig":"MEUCIQD+Yi+V7Bi6W2k1aLq/oYU2R5eMPIv3Nj/BxZC8GjLYkAIgFQBC1ze3EeKv+cD43OCOv0OoQ6VtoaRALblRClay/WI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127668},"jest":{"rootDir":"src","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"testEnvironment":"node","coverageDirectory":"../coverage","collectCoverageFrom":["**/*.(t|j)s"],"moduleFileExtensions":["js","json","ts"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7fb149ec65268b7e28f82d373d26eccecd4ce5e8","scripts":{"lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","test":"jest","build":"nest build","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:cov":"jest --coverage","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand","test:watch":"jest --watch"},"_npmUser":{"name":"deadst0ne","email":"deadstone@list.ru"},"repository":{"url":"git+https://github.com/DEADST0NE/nest-rabbitmq.git","type":"git"},"_npmVersion":"10.5.0","description":"A package for RabbitMQ integration","directories":{},"_nodeVersion":"21.6.2","dependencies":{"rxjs":"^7.8.1","amqplib":"^0.10.4","@nestjs/core":"^10.3.9","@nestjs/common":"^10.3.9","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^10.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.42.0","ts-jest":"^29.1.4","ts-node":"^10.9.2","prettier":"^3.3.1","supertest":"^7.0.0","ts-loader":"^9.5.1","typescript":"^5.4.5","@nestjs/cli":"^10.3.2","@types/jest":"^29.5.12","@types/node":"^20.14.2","@types/amqplib":"^0.10.5","tsconfig-paths":"^4.2.0","@nestjs/testing":"^10.3.9","@types/supertest":"^6.0.2","@nestjs/schematics":"^10.1.1","source-map-support":"^0.5.21","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-rabbitmq_1.0.0_1717893841082_0.06406947037169042","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@deadstone/nestjs-rabbitmq","version":"1.0.1","author":{"name":"deadstone"},"license":"MIT","_id":"@deadstone/nestjs-rabbitmq@1.0.1","maintainers":[{"name":"deadst0ne","email":"deadstone@list.ru"}],"homepage":"https://github.com/DEADST0NE/nest-rabbitmq","bugs":{"url":"https://github.com/DEADST0NE/nest-rabbitmq/issues"},"dist":{"shasum":"ff85bf1a6b05bd6975560a96bd7fd48565e6a597","tarball":"https://registry.npmjs.org/@deadstone/nestjs-rabbitmq/-/nestjs-rabbitmq-1.0.1.tgz","fileCount":32,"integrity":"sha512-5GZDRMAphWM3goupi3olM3zEDdgwQzGP6xYAQ7BT/YSIwc1idxuYsu3P/VnEO8aAQh/8aRznztAdQiA/RvNPVg==","signatures":[{"sig":"MEUCIQC1NTE/QYAVkHEGITlYt4Hv2k9byPrH5bwx6yKewkw7swIga1HSVbwyI9MDN6vbGea1DQTNIruThKI1O+k1fVU326o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":134221},"jest":{"rootDir":"src","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"testEnvironment":"node","coverageDirectory":"../coverage","collectCoverageFrom":["**/*.(t|j)s"],"moduleFileExtensions":["js","json","ts"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7e15a5fb4f033b1b52c08639924d573f0fcc081b","scripts":{"lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","test":"jest","build":"nest build","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:cov":"jest --coverage","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand","test:watch":"jest --watch"},"_npmUser":{"name":"deadst0ne","email":"deadstone@list.ru"},"repository":{"url":"git+https://github.com/DEADST0NE/nest-rabbitmq.git","type":"git"},"_npmVersion":"10.9.2","description":"A package for RabbitMQ integration","directories":{},"_nodeVersion":"23.6.0","dependencies":{"rxjs":"^7.8.1","amqplib":"^0.10.4","@nestjs/core":"^10.3.9","@nestjs/common":"^10.3.9","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^10.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.42.0","ts-jest":"^29.1.4","ts-node":"^10.9.2","prettier":"^3.3.1","supertest":"^7.0.0","ts-loader":"^9.5.1","typescript":"^5.4.5","@nestjs/cli":"^10.3.2","@types/jest":"^29.5.12","@types/node":"^20.14.2","@types/amqplib":"^0.10.5","tsconfig-paths":"^4.2.0","@nestjs/testing":"^10.3.9","@types/supertest":"^6.0.2","@nestjs/schematics":"^10.1.1","source-map-support":"^0.5.21","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-rabbitmq_1.0.1_1747855376053_0.004855303026732427","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@deadstone/nestjs-rabbitmq","version":"1.0.3","description":"A package for RabbitMQ integration","author":{"name":"deadstone"},"license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/DEADST0NE/nest-rabbitmq.git"},"homepage":"https://github.com/DEADST0NE/nest-rabbitmq","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"nest build","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"eslint \"{src,apps,libs,test}/**/*.ts\" --fix","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand"},"dependencies":{"@nestjs/common":"^10.3.9","@nestjs/core":"^10.3.9","@nestjs/platform-express":"^10.3.9","amqplib":"^0.10.4","reflect-metadata":"^0.2.2","rxjs":"^7.8.1"},"devDependencies":{"@nestjs/cli":"^10.3.2","@nestjs/schematics":"^10.1.1","@nestjs/testing":"^10.3.9","@types/amqplib":"^0.10.5","@types/jest":"^29.5.12","@types/node":"^20.14.2","@types/supertest":"^6.0.2","@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.3.1","source-map-support":"^0.5.21","supertest":"^7.0.0","ts-jest":"^29.1.4","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","typescript":"^5.4.5"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":"src","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"collectCoverageFrom":["**/*.(t|j)s"],"coverageDirectory":"../coverage","testEnvironment":"node"},"_id":"@deadstone/nestjs-rabbitmq@1.0.3","gitHead":"7e15a5fb4f033b1b52c08639924d573f0fcc081b","bugs":{"url":"https://github.com/DEADST0NE/nest-rabbitmq/issues"},"_nodeVersion":"23.6.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-a7TXr0KBauuPx7JaMSoVDth1Fa8zYRobChrsrNHnqPJ5smcJhO+sOSp1Sc6rQg8jNoGnLRaNYnWs3dnQ4/PNUw==","shasum":"c7459340c365c12530022ef6ba5a1bff10be8eac","tarball":"https://registry.npmjs.org/@deadstone/nestjs-rabbitmq/-/nestjs-rabbitmq-1.0.3.tgz","fileCount":32,"unpackedSize":134399,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC8P7C44TDRMyD36U8h/7jc/OojTZeuuOSjBeLY6zzlwwIhAMK5DeU2hWWkKbJ9rHsscfrHTFL3/lZwFD2lwoGe/7Fc"}]},"_npmUser":{"name":"deadst0ne","email":"deadstone@list.ru","actor":{"name":"deadst0ne","email":"deadstone@list.ru","type":"user"}},"directories":{},"maintainers":[{"name":"deadst0ne","email":"deadstone@list.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-rabbitmq_1.0.3_1750688646203_0.1836289475294175"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-09T00:44:01.007Z","modified":"2025-06-23T14:24:06.671Z","1.0.0":"2024-06-09T00:44:01.218Z","1.0.1":"2025-05-21T19:22:56.277Z","1.0.3":"2025-06-23T14:24:06.393Z"},"bugs":{"url":"https://github.com/DEADST0NE/nest-rabbitmq/issues"},"author":{"name":"deadstone"},"license":"MIT","homepage":"https://github.com/DEADST0NE/nest-rabbitmq","repository":{"type":"git","url":"git+https://github.com/DEADST0NE/nest-rabbitmq.git"},"description":"A package for RabbitMQ integration","maintainers":[{"name":"deadst0ne","email":"deadstone@list.ru"}],"readme":"# @deadstone/rabbitmq\n\nA Nest.js module for RabbitMQ integration.\n\n## Installation\n\n<pre>\nnpm install @deadstone/rabbitmq\n</pre>\n\n## Usage\n\n### Importing Module\n\n<pre>\nimport { Module } from'@nestjs/common';\nimport { RabbitmqModule, RabbitModuleOptions } from '@deadstone/rabbitmq';\n\n@Module({\n  imports: [\n    RabbitmqModule.forRoot({\n      url: 'amqp://localhost',\n      connectionName: 'test-connection',\n    }),\n  ],\n})\nexport class AppModule {}\n</pre>\n\n### Injecting RabbitService\n\n<pre>\nimport { Injectable } '@nestjs/common';\nimport { RabbitmqService } from '@deadstone/rabbitmq';\n\n@Injectable()\nexport class MyService {\n  constructor(private readonly rabbitService: RabbitmqService) {}\n\n  async sendMessageToQueue () {\n    await this.rabbitService.assertQueue('my-queue', { durable: true });\n    await this.rabbitService.sendToQueue('my-queue', { message: 'Hello, RabbitMQ!' }, {});\n  }\n}\n</pre>\n\n## API Reference\n\n### RabbitmqModule.forRoot(options: RabbitModuleOptions): DynamicModule\n\nCreates a dynamic module for synchronously configuring the RabbitMQ connection options.\n\n- `options` (RabbitModuleOptions): RabbitMQ connection options.\n\n### RabbitmqModule.forRootAsync(options: RabbitModuleAsyncOptions): DynamicModule\n\nCreates a dynamic module for asynchronously configuring the RabbitMQ connection options.\n\n- `options` (RabbitModuleAsyncOptions): Asynchronous RabbitMQ connection options.\n\n### RabbitmqService\n\nThe RabbitMQ service provides methods for interacting with RabbitMQ.\n\n#### Methods\n\n- `connect(): Promise<void>`: Establishes a connection to RabbitMQ.\n- `disconnect(): Promise<void>`: Closes the connection to RabbitMQ.\n- `assertQueue(name: string, options: QueueOptions): Promise<string>`: Asserts a queue in RabbitMQ.\n- `sendToQueue(queue: string, data: Record<string, any>, options: MessageOptions): void`: Sends a message to the specified queue.\n- `subscribeToQueue(queue: string, callback: QueueCallback, options: QueueOptions = {}): Promise<string>`: Subscribes to a queue in RabbitMQ.\n\n## Contributing\n\nContributions welcome! See [Contributing](CONTRIBUTING.md).\n\n## Notes\n\nThis project is not endorsed by or affiliated with [RabbitMQ](https://www.rabbitmq.com/).\n\n## Author\n\nRuslan Pakhlivanov, [github](https://github.com/DEADST0NE).\n\n## License\n\nLicensed under the [MIT licensed](LICENSE).\n","readmeFilename":"README.md"}