{"id":20527032,"url":"https://github.com/node-ts/bus-redis","last_synced_at":"2025-03-06T01:48:22.840Z","repository":{"id":45922493,"uuid":"414761587","full_name":"node-ts/bus-redis","owner":"node-ts","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-28T05:43:00.000Z","size":162,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T21:55:11.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-ts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-07T21:23:03.000Z","updated_at":"2023-04-28T18:06:59.000Z","dependencies_parsed_at":"2022-09-05T01:40:46.560Z","dependency_job_id":null,"html_url":"https://github.com/node-ts/bus-redis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-ts%2Fbus-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-ts%2Fbus-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-ts%2Fbus-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-ts%2Fbus-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-ts","download_url":"https://codeload.github.com/node-ts/bus-redis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242133450,"owners_count":20077097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T23:17:01.237Z","updated_at":"2025-03-06T01:48:22.801Z","avatar_url":"https://github.com/node-ts.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @node-ts/bus-redis\n\n[![Known Vulnerabilities](https://snyk.io/test/github/node-ts/bus/badge.svg)](https://snyk.io/test/github/node-ts/bus)\n[![CircleCI](https://circleci.com/gh/node-ts/bus/tree/master.svg?style=svg)](https://circleci.com/gh/node-ts/bus/tree/master)[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nA redis transport adapter for `@node-ts/bus`.\n\n## Installation\n\nInstall all packages and their dependencies\n\n```bash\nnpm i reflect-metadata inversify @node-ts/bus-redis @node-ts/bus-core\n```\n\nOnce installed, load the `BusRedisModule` to your inversify container alongside the other modules it depends on:\n\n```typescript\nimport { Container } from 'inversify'\nimport { LoggerModule } from '@node-ts/logger-core'\nimport { BusModule } from '@node-ts/bus-core'\nimport { BUS_REDIS_SYMBOLS, BusRedisModule, RedisTransportConfiguration } from '@node-ts/bus-redis'\n\nconst container = new Container()\ncontainer.load(new LoggerModule())\ncontainer.load(new BusModule())\ncontainer.load(new BusRedisModule())\n\nconst redisConfiguration: RedisTransportConfiguration = {\n  queueName: 'accounts-application-queue',\n  connectionString: 'redis://127.0.0.1:6379',\n  maxRetries: 3,\n\n}\ncontainer.bind(BUS_REDIS_SYMBOLS.TransportConfiguration).toConstantValue(redisConfiguration)\n```\n\n## Configuration Options\n\nThe Redis transport has the following configuration:\n\n* **queueName** *(required)* The name of the service queue to create and read messages from.\n* **connectionString** *(required)* A redis formatted connection string that's used to connect to the Redis instance\n* **maxRetries** *(optional)* The number of attempts to retry failed messages before they're routed to the dead letter queue. *Default: 10*\n* **visibilityTimeout** *(optional)* The time taken before a message has been deemed to have failed or stalled. Once this time has been exceeded the message will be re-added to queue. *Default: 30000*\n* **subscriptionsKeyPrefix** *(optional)* Different queues may want to be aware of the same event being sent on the bus. We need to store a set of queue names that are interested in events being published on the bus and where better than redis at a certain key. *Default: 'node-ts:bus-redis:subscriptions:'*\n## Development\n\nLocal development can be done with the aid of docker to run the required infrastructure. To do so, run:\n\n```bash\ndocker run --name redis -e ALLOW_EMPTY_PASSWORD=yes -p 6379:6379 bitnami/redis\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-ts%2Fbus-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-ts%2Fbus-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-ts%2Fbus-redis/lists"}