{"id":13455024,"url":"https://github.com/weyoss/redis-smq","last_synced_at":"2026-04-18T11:15:02.205Z","repository":{"id":41145725,"uuid":"96329711","full_name":"weyoss/redis-smq","owner":"weyoss","description":"A simple high-performance Redis message queue for Node.js.","archived":false,"fork":false,"pushed_at":"2026-04-11T21:59:16.000Z","size":13817,"stargazers_count":660,"open_issues_count":4,"forks_count":65,"subscribers_count":7,"default_branch":"next","last_synced_at":"2026-04-11T22:24:42.014Z","etag":null,"topics":["background-jobs","brokers","dead-letter-queue","delayed-jobs","distributed-systems","high-performance","message-brokers","message-queues","microservices","node-js","priority-queues","queue-system","queue-workers","redis","redis-queue","redis-server","scalable","scheduled-jobs","scheduled-tasks","task-queue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weyoss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-07-05T14:42:32.000Z","updated_at":"2026-04-11T21:59:21.000Z","dependencies_parsed_at":"2025-12-25T10:06:36.827Z","dependency_job_id":null,"html_url":"https://github.com/weyoss/redis-smq","commit_stats":{"total_commits":696,"total_committers":1,"mean_commits":696.0,"dds":0.0,"last_synced_commit":"f2f6af1643f3f03841e215b85701ad2d30a1d0ee"},"previous_names":[],"tags_count":253,"template":false,"template_full_name":null,"purl":"pkg:github/weyoss/redis-smq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weyoss%2Fredis-smq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weyoss%2Fredis-smq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weyoss%2Fredis-smq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weyoss%2Fredis-smq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weyoss","download_url":"https://codeload.github.com/weyoss/redis-smq/tar.gz/refs/heads/next","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weyoss%2Fredis-smq/sbom","scorecard":{"id":1236838,"data":{"date":"2025-07-07","repo":{"name":"github.com/weyoss/redis-smq","commit":"2f37b0f236ed61024802f3476800b7989d6bf8fc"},"scorecard":{"version":"v5.2.1-18-gbb9c347d","commit":"bb9c347dff6349d986baab6578a46d68a5524c62"},"score":4.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:16","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:15","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/weyoss/redis-smq/tests.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/codeql.yml:35","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:69","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-x2rg-q646-7m2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/bb9c347dff6349d986baab6578a46d68a5524c62/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-09-02T19:14:41.285Z","repository_id":41145725,"created_at":"2025-09-02T19:14:41.285Z","updated_at":"2025-09-02T19:14:41.285Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["background-jobs","brokers","dead-letter-queue","delayed-jobs","distributed-systems","high-performance","message-brokers","message-queues","microservices","node-js","priority-queues","queue-system","queue-workers","redis","redis-queue","redis-server","scalable","scheduled-jobs","scheduled-tasks","task-queue"],"created_at":"2024-07-31T08:01:00.429Z","updated_at":"2026-04-18T11:15:02.200Z","avatar_url":"https://github.com/weyoss.png","language":"TypeScript","funding_links":[],"categories":["Packages","Repository","包","目录","Redis based Job Queues","Message Queue Middlewares"],"sub_categories":["Job queues","Job Queues","任务队列","工作队列"],"readme":"\u003cdiv align=\"center\" style=\"text-align: center\"\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/weyoss/redis-smq\"\u003e\u003cimg src=\"logo.png\" alt=\"RedisSMQ\" width=\"500px\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eA high-performance Redis message queue for Node.js — simple to use, built for scale.\u003c/p\u003e\n\n[![Pre-release (next)](https://img.shields.io/npm/v/redis-smq/next?style=flat-square\u0026label=redis-smq%40next)](https://github.com/weyoss/redis-smq/releases)\n[![Build (next)](https://img.shields.io/github/actions/workflow/status/weyoss/redis-smq/tests.yml?branch=next\u0026style=flat-square)](https://github.com/weyoss/redis-smq/actions/workflows/tests.yml?query=branch%3Anext)\n[![Code Quality (next)](https://img.shields.io/github/actions/workflow/status/weyoss/redis-smq/codeql.yml?branch=next\u0026style=flat-square\u0026label=quality)](https://github.com/weyoss/redis-smq/actions/workflows/codeql.yml?query=branch%3Anext)\n\n\u003c/div\u003e\n\n\u003e 💡 **Note:** You are viewing the `next` branch with upcoming features. For stable releases, check the [`master` branch](https://github.com/weyoss/redis-smq/tree/master).\n\n## ✨ Features\n\n- 📬 [Reliable delivery](packages/redis-smq/docs/message-reliability.md) with retries\n- 📊 [Multiple queue types](packages/redis-smq/docs/queues.md): FIFO, LIFO, Priority\n- 🔀 [Flexible routing](packages/redis-smq/docs/message-exchanges.md): Direct/Topic/Fanout exchanges + Direct queue publishing\n- 👥 [Pub/Sub \u0026 Point-to-Point](packages/redis-smq/docs/queue-delivery-models.md) delivery models with native consumer groups\n- 🚦 [Queue-level rate limiting](packages/redis-smq/docs/queue-rate-limiting.md)\n- ⏰ [Built-in scheduler](packages/redis-smq/docs/scheduling-messages.md): delays, CRON, repeating\n- 🔒 [Queue state management](packages/redis-smq/docs/queue-state-management-system.md): pause/stop/resume + audit\n- ⏱️ [Message TTL \u0026 consumption timeouts](packages/redis-smq/docs/messages.md)\n- 🚀 [High-throughput design](packages/redis-smq/docs/performance.md) with atomic Lua scripts\n- 📦 [Batch acks](packages/redis-smq/docs/message-batch-acknowledgements.md) \u0026 [Batch unacks](packages/redis-smq/docs/message-batch-unacknowledgements.md) — 99% fewer Redis calls\n- 🧵 [Worker threads](packages/redis-smq/docs/message-handler-worker-threads.md) for CPU-heavy handlers\n- 🔄 [Multi-queue producers \u0026 consumers](packages/redis-smq/docs/consuming-messages.md) with [multiplexing](packages/redis-smq/docs/multiplexing.md) support\n- 📡 [Event bus](packages/redis-smq/docs/event-bus.md) for real-time internal events\n- 🌐 [REST API](packages/redis-smq-rest-api/README.md) with OpenAPI + Swagger\n- 📊 [Web UI](packages/redis-smq-web-ui/README.md) for live management\n- 🎯 [Process-wide API](packages/redis-smq/docs/simplified-redis-smq-api.md) — initialize once, factory methods, single shutdown\n- 🔄 [Dual callback \u0026 promise support](packages/redis-smq/docs/dual-callback-and-promise-support.md)\n- 📦 [ESM + CJS](packages/redis-smq/docs/esm-cjs-modules.md) module support\n- 📖 [TypeScript-first](packages/redis-smq/docs/api/README.md) with rich docs\n\n## 🎯 Use Cases\n\n- **Background jobs**: emails, reports, data processing\n- **Task scheduling** with automatic retries\n- **Microservices communication**\n- **Real-time event processing** for gaming, IoT, analytics\n\n## 📋 Requirements\n\n- Node.js 20+\n- Redis 4+\n- Choose one Redis client: [`ioredis`](https://github.com/redis/ioredis) or [`@redis/client`](https://github.com/redis/node-redis)\n\n## 🚀 Quick Start\n\n### 1. Install\n\n```bash\n# Core packages\nnpm install redis-smq@next redis-smq-common@next --save\n\n# Pick a Redis client\nnpm install ioredis --save\n# OR\nnpm install @redis/client --save\n```\n\n### 2. Initialize (once per process)\n\n```javascript\nimport { RedisSMQ } from 'redis-smq';\nimport { ERedisConfigClient } from 'redis-smq-common';\n\n// Simple initialization\nRedisSMQ.initialize(\n  {\n    client: ERedisConfigClient.IOREDIS,\n    options: { host: '127.0.0.1', port: 6379 }\n  },\n  (err) =\u003e {\n    if (err) console.error('RedisSMQ init failed:', err);\n  }\n);\n```\n\n### 3. Create a Queue\n\n```javascript\nimport { RedisSMQ, EQueueType, EQueueDeliveryModel } from 'redis-smq';\n\nconst queueManager = RedisSMQ.createQueueManager();\nqueueManager.save(\n  'my_queue',\n  EQueueType.LIFO_QUEUE,\n  EQueueDeliveryModel.POINT_TO_POINT,\n  (err) =\u003e {\n    if (err) console.error('Queue creation failed:', err);\n    else console.log('✅ Queue created');\n  }\n);\n```\n\n### 4. Produce a Message\n\n```javascript\nimport { RedisSMQ, ProducibleMessage } from 'redis-smq';\n\nconst producer = RedisSMQ.createProducer();\nproducer.run((err) =\u003e {\n  if (err) return console.error('Producer failed:', err);\n  \n  const msg = new ProducibleMessage()\n    .setQueue('my_queue')\n    .setBody('Hello World!');\n  \n  producer.produce(msg, (err, ids) =\u003e {\n    if (err) console.error('Send failed:', err);\n    else console.log(`📨 Sent message: ${ids.join(', ')}`);\n  });\n});\n```\n\n### 5. Consume Messages\n\n```javascript\nimport { RedisSMQ } from 'redis-smq';\n\nconst consumer = RedisSMQ.createConsumer();\nconsumer.run((err) =\u003e {\n  if (err) return console.error('Consumer failed:', err);\n  \n  const handler = (message, done) =\u003e {\n    console.log('📥 Received:', message.body);\n    done(); // Acknowledge\n  };\n  \n  consumer.consume('my_queue', handler, (err) =\u003e {\n    if (err) console.error('Consume failed:', err);\n    else console.log('👂 Listening on my_queue...');\n  });\n});\n```\n\n## 🧩 Using Promises\n\n```typescript\nimport { RedisSMQ, EQueueType, EQueueDeliveryModel } from 'redis-smq';\n\ntry {\n  // Initialize RedisSMQ\n  await RedisSMQ.initialize({\n    client: ERedisConfigClient.IOREDIS,\n    options: { host: 'localhost', port: 6379 }\n  });\n  \n  // Create a Queue\n  const queueManager = RedisSMQ.createQueueManager();\n  await queueManager.save(\n    'my_queue',\n    EQueueType.LIFO_QUEUE,\n    EQueueDeliveryModel.POINT_TO_POINT,\n  );\n\n  // Create and start a producer\n  const producer = RedisSMQ.createProducer();\n  await producer.run();\n\n  // Send a message\n  const message = new ProducibleMessage()\n    .setQueue('my-queue')\n    .setBody({ hello: 'world' });\n  \n  const messageIds = await producer.produce(message);\n  console.log('Message published:', messageIds);\n\n  // Create and start a consumer\n  const consumer = RedisSMQ.createConsumer();\n  await consumer.run();\n\n  // Consume messages\n  await consumer.consume('my-queue', async (message) =\u003e {\n    console.log('Received:', message.getBody());\n    // Successful acknowledgement \n  });\n} catch (err) {\n  console.error('Error:', err);\n}\n```\n\nSee [Dual Callback \u0026 Promise Support](packages/redis-smq/docs/dual-callback-and-promise-support.md).\n\n## 📦 Packages\n\n| Package                                                             | Description                |\n|---------------------------------------------------------------------|----------------------------|\n| **[redis-smq](packages/redis-smq/README.md)**                       | Core message queue library |\n| **[redis-smq-common](packages/redis-smq-common/README.md)**         | Shared utilities           |\n| **[redis-smq-rest-api](packages/redis-smq-rest-api/README.md)**     | REST API with Swagger UI   |\n| **[redis-smq-web-ui](packages/redis-smq-web-ui/README.md)**         | Web dashboard              |\n| **[redis-smq-web-server](packages/redis-smq-web-server/README.md)** | Web server for UI \u0026 API    |\n| **[redis-smq-benchmarks](packages/redis-smq-benchmarks/README.md)** | Performance testing        |\n\n\u003e 🔗 **Version Compatibility:** Always use matching versions. See [version compatibility guide](packages/redis-smq/docs/version-compatibility.md).\n\n## 📚 Documentation\n\n- **[Full Documentation](packages/redis-smq/docs/README.md)** - Complete API reference and guides\n- **[REST API](packages/redis-smq-rest-api/README.md)** - API endpoints and usage\n- **[Web UI](packages/redis-smq-web-ui/README.md)** - Dashboard setup and features\n\n## 🤝 Contributing\n\nWe welcome contributions! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## 📄 License\n\nRedisSMQ is released under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweyoss%2Fredis-smq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweyoss%2Fredis-smq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweyoss%2Fredis-smq/lists"}