{"id":13455016,"url":"https://github.com/smrchy/rsmq","last_synced_at":"2025-10-24T09:57:31.308Z","repository":{"id":44725877,"uuid":"10435502","full_name":"smrchy/rsmq","owner":"smrchy","description":"Redis Simple Message Queue","archived":false,"fork":false,"pushed_at":"2021-06-14T09:29:36.000Z","size":337,"stargazers_count":1796,"open_issues_count":26,"forks_count":120,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-10-05T07:30:17.814Z","etag":null,"topics":["fifo","message-queue","nodejs","npm","queue","redis","rsmq"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/smrchy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-02T10:36:20.000Z","updated_at":"2025-09-28T09:15:14.000Z","dependencies_parsed_at":"2022-08-12T11:21:38.524Z","dependency_job_id":null,"html_url":"https://github.com/smrchy/rsmq","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/smrchy/rsmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smrchy%2Frsmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smrchy%2Frsmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smrchy%2Frsmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smrchy%2Frsmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smrchy","download_url":"https://codeload.github.com/smrchy/rsmq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smrchy%2Frsmq/sbom","scorecard":{"id":833884,"data":{"date":"2025-08-11","repo":{"name":"github.com/smrchy/rsmq","commit":"5c507c2ae97145fbdef7369da52dc69b105e0cc6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T18:27:07.200Z","repository_id":44725877,"created_at":"2025-08-23T18:27:07.201Z","updated_at":"2025-08-23T18:27:07.201Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280776479,"owners_count":26388950,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"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":["fifo","message-queue","nodejs","npm","queue","redis","rsmq"],"created_at":"2024-07-31T08:01:00.370Z","updated_at":"2025-10-24T09:57:31.271Z","avatar_url":"https://github.com/smrchy.png","language":"JavaScript","funding_links":[],"categories":["Packages","JavaScript","Repository","包","目录","Job queues","Message Queue Middlewares"],"sub_categories":["Job queues","Job Queues","任务队列","工作队列"],"readme":"![RSMQ: Redis Simple Message Queue for Node.js](https://img.webmart.de/rsmq_wide.png)\n\n# Redis Simple Message Queue\nA lightweight message queue for Node.js that requires no dedicated queue server. Just a Redis server.\n\n[![Build Status](https://secure.travis-ci.org/smrchy/rsmq.png?branch=master)](http://travis-ci.org/smrchy/rsmq)\n[![Dependency Status](https://david-dm.org/smrchy/rsmq.svg)](https://david-dm.org/smrchy/rsmq)\n\n**tl;dr:** If you run a Redis server and currently use Amazon SQS or a similar message queue you might as well use this fast little replacement. Using a shared Redis server multiple Node.js processes can send / receive messages.\n\n## Features\n* Lightweight: **Just Redis** and ~500 lines of javascript.\n* Speed: Send/receive 10000+ messages per second on an average machine. It's **just Redis**.\n* Guaranteed **delivery of a message to exactly one recipient** within a messages visibility timeout.\n* Received messages that are not deleted will reappear after the visibility timeout.\n* [Test coverage](http://travis-ci.org/smrchy/rsmq)\n* A message is deleted by the message id. The message id is returned by the `sendMessage` and `receiveMessage` method.\n* Messages stay in the queue unless deleted.\n* Optional RESTful interface via [rest-rsmq](https://github.com/smrchy/rest-rsmq)\n* Typescript Typings ❤️\n* Optional Promise-based API (only if `Promise` is defined), just suffix your method with `Async`, eg: `sendMessage` -\u003e `sendMessageAsync`, all queue methods are supported\n\n**Note:** RSMQ uses the Redis EVAL command (LUA scripts) so the minimum Redis version is 2.6+. \n\n## Usage\n* After creating a queue you can send messages to that queue.\n* The messages will be handled in a **FIFO** (first in first out) manner unless specified with a delay.\n* Every message has a unique `id` that you can use to delete the message. \n* The `sendMessage` method will return the `id` for a sent message.\n* The `receiveMessage` method will return an `id` along with the message and some stats.\n* Should you not delete the message it will be eligible to be received again after the visibility timeout is reached.\n* Please have a look at the `createQueue` and `receiveMessage` methods described below for optional parameters like **visibility timeout** and **delay**.\n\n## Installation\n`npm install rsmq`\n\n## Modules for RSMQ\nTo keep the core of *RSMQ* small additional functionality is available as modules:\n\n* [**rsmq-worker**](https://github.com/mpneuried/rsmq-worker) Helper to implement a worker with RSMQ.\n* [**rest-rsmq**](https://github.com/smrchy/rest-rsmq) A RESTful interface for RSMQ.\n* [**rsmq-cli**](https://github.com/mpneuried/rsmq-cli) A command-line interface / Terminal client for RSMQ.\n* [**rsmq-promise-native**](https://www.npmjs.com/package/rsmq-promise-native) Native promise interface for RSMQ.\n* [**rsmq-promise**](https://www.npmjs.com/package/rsmq-promise) Promise interface for RSMQ (via Bluebird).\n\n## RSMQ in other languages\n\nThe simplicity of RSMQ is useful in other languages. Here is a list of implementations in other languages:\n\n* [**Rust**](https://github.com/Couragium/rsmq-async-rs) RSMQ Async for Rust. See [#107](https://github.com/smrchy/rsmq/issues/107)\n* [**Java**](https://github.com/igr/jrsmq) RSMQ for Java. See [#48](https://github.com/smrchy/rsmq/issues/48)\n* [**PHP**](https://github.com/michsindelar/PhpRSMQ) RSMQ for PHP (work in progress)\n* [**CSharp/DotNet**](https://github.com/tontonrally/rsmqCsharp) RSMQ for .NET\n\nNote: Should you plan to port RSQM to another language please make sure to have tests to ensure compatibility with all RSMQ clients. And of course: let me know so i can mention your port here.\n\n## Methods\n\n### Constructor\nCreates a new instance of RSMQ.\n\nParameters:\n\n* `host` (String): *optional (Default: \"127.0.0.1\")* The Redis server\n* `port` (Number): *optional (Default: 6379)* The Redis port\n* `options` (Object): *optional (Default: {})* The [Redis options](https://github.com/NodeRedis/node_redis#options-object-properties) object. \n* `client` (RedisClient): *optional* A existing redis client instance. `host` and `server` will be ignored.\n* `ns` (String): *optional (Default: \"rsmq\")* The namespace prefix used for all keys created by RSMQ\n* `realtime` (Boolean): *optional (Default: false)* Enable realtime PUBLISH of new messages (see the [Realtime section](#realtime))\n* `password` (String): *optional (Default: null)* If your Redis server requires a password supply it here\n\nExample:\n\n```javascript\nconst RedisSMQ = require(\"rsmq\");\nconst rsmq = new RedisSMQ( {host: \"127.0.0.1\", port: 6379, ns: \"rsmq\"} );\n```\n\n### Queue\n\n#### createQueue(options, callback)\nCreate a new queue.\n\nParameters:\n\n* `qname` (String): The Queue name. Maximum 160 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.\n* `vt` (Number): *optional* *(Default: 30)* The length of time, in seconds, that a message received from a queue will be invisible to other receiving components when they ask to receive messages. Allowed values: 0-9999999 (around 115 days)\n* `delay` (Number): *optional* *(Default: 0)* The time in seconds that the delivery of all new messages in the queue will be delayed. Allowed values: 0-9999999 (around 115 days)\n* `maxsize` (Number): *optional* *(Default: 65536)* The maximum message size in bytes. Allowed values: 1024-65536 and -1 (for unlimited size)\n\nReturns:\n\n* `1` (Number)\n\nExample:\n\n```javascript\nrsmq.createQueue({ qname: \"myqueue\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tif (resp === 1) {\n\t\tconsole.log(\"queue created\")\n\t}\n});\n```\n\n#### listQueues(options, callback)\nList all queues\n\nReturns an array:\n\n* `[\"qname1\", \"qname2\"]`\n\nExample:\n\n```javascript\nrsmq.listQueues(function (err, queues) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tconsole.log(\"Active queues: \" + queues.join( \",\" ) )\n});\n```\n\n#### deleteQueue(options, callback)\nDeletes a queue and all messages.\n\nParameters:\n\n* `qname` (String): The Queue name.\n\nReturns:\n\n* `1` (Number)\n\nExample:\n\n```javascript\nrsmq.deleteQueue({ qname: \"myqueue\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tif (resp === 1) {\n\t\tconsole.log(\"Queue and all messages deleted.\")\n\t} else {\n\t\tconsole.log(\"Queue not found.\")\n\t}\n});\n```\n\n#### getQueueAttributes(options, callback)\nGet queue attributes, counter and stats\n\nParameters:\n\n* `qname` (String): The Queue name.\n\nReturns an object:\n\n* `vt` (Number): The visibility timeout for the queue in seconds\n* `delay` (Number): The delay for new messages in seconds\n* `maxsize` (Number): The maximum size of a message in bytes\n* `totalrecv` (Number): Total number of messages received from the queue\n* `totalsent` (Number): Total number of messages sent to the queue\n* `created` (Number): Timestamp (epoch in seconds) when the queue was created\n* `modified` (Number): Timestamp (epoch in seconds) when the queue was last modified with `setQueueAttributes`\n* `msgs` (Number): Current number of messages in the queue\n* `hiddenmsgs` (Number): Current number of hidden / not visible messages. A message can be hidden while \"in flight\" due to a `vt` parameter or when sent with a `delay`\n\nExample:\n\n```javascript\nrsmq.getQueueAttributes({ qname: \"myqueue\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err);\n\t\treturn;\n\t}\n\n\tconsole.log(\"==============================================\");\n\tconsole.log(\"=================Queue Stats==================\");\n\tconsole.log(\"==============================================\");\n\tconsole.log(\"visibility timeout: \", resp.vt);\n\tconsole.log(\"delay for new messages: \", resp.delay);\n\tconsole.log(\"max size in bytes: \", resp.maxsize);\n\tconsole.log(\"total received messages: \", resp.totalrecv);\n\tconsole.log(\"total sent messages: \", resp.totalsent);\n\tconsole.log(\"created: \", resp.created);\n\tconsole.log(\"last modified: \", resp.modified);\n\tconsole.log(\"current n of messages: \", resp.msgs);\n\tconsole.log(\"hidden messages: \", resp.hiddenmsgs);\n});\n```\n\n    \n#### setQueueAttributes(options, callback)\nSets queue parameters.\n\nParameters:\n\n* `qname` (String): The Queue name.\n* `vt` (Number): *optional* * The length of time, in seconds, that a message received from a queue will be invisible to other receiving components when they ask to receive messages. Allowed values: 0-9999999 (around 115 days)\n* `delay` (Number): *optional* The time in seconds that the delivery of all new messages in the queue will be delayed. Allowed values: 0-9999999 (around 115 days)\n* `maxsize` (Number): *optional* The maximum message size in bytes. Allowed values: 1024-65536 and -1 (for unlimited size)\n\nNote: At least one attribute (vt, delay, maxsize) must be supplied. Only attributes that are supplied will be modified.\n\nReturns an object:\n\n* `vt` (Number): The visibility timeout for the queue in seconds\n* `delay` (Number): The delay for new messages in seconds\n* `maxsize` (Number): The maximum size of a message in bytes\n* `totalrecv` (Number): Total number of messages received from the queue\n* `totalsent` (Number): Total number of messages sent to the queue\n* `created` (Number): Timestamp (epoch in seconds) when the queue was created\n* `modified` (Number): Timestamp (epoch in seconds) when the queue was last modified with `setQueueAttributes`\n* `msgs` (Number): Current number of messages in the queue\n* `hiddenmsgs` (Number): Current number of hidden / not visible messages. A message can be hidden while \"in flight\" due to a `vt` parameter or when sent with a `delay`\n\nExample:\n\n```javascript\nrsmq.setQueueAttributes({ qname: \"myqueue\", vt: \"30\"}, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tconsole.log(\"changed the invisibility time of messages that have been received to 30 seconds\");\n\tconsole.log(resp);\n});\n```\n\n### Messages\n\n#### sendMessage\nSends a new message.\n\nParameters:\n\n* `qname` (String)\n* `message` (String)\n* `delay` (Number): *optional* *(Default: queue settings)* The time in seconds that the delivery of the message will be delayed. Allowed values: 0-9999999 (around 115 days)\n\nReturns:\n\n* `id` (String): The internal message id.\n\nExample:\n\n```javascript\nrsmq.sendMessage({ qname: \"myqueue\", message: \"Hello World \"}, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tconsole.log(\"Message sent. ID:\", resp);\n});\n```\n\n#### receiveMessage(options, callback)\nReceive the next message from the queue.\n\nParameters:\n\n* `qname` (String): The Queue name.\n* `vt` (Number): *optional* *(Default: queue settings)* The length of time, in seconds, that the received message will be invisible to others. Allowed values: 0-9999999 (around 115 days)\n\nReturns an object:\n\n  * `message` (String): The message's contents.\n  * `id` (String): The internal message id.\n  * `sent` (Number): Timestamp of when this message was sent / created.\n  * `fr` (Number): Timestamp of when this message was first received.\n  * `rc` (Number): Number of times this message was received.\n\nNote: Will return an empty object if no message is there  \n\nExample:\n\n```javascript\nrsmq.receiveMessage({ qname: \"myqueue\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tif (resp.id) {\n\t\tconsole.log(\"Message received.\", resp)\n\t} else {\n\t\tconsole.log(\"No messages for me...\")\n\t}\n});\n```\n\n#### deleteMessage(options, callback)\nParameters:\n\n* `qname` (String): The Queue name.\n* `id` (String): message id to delete.\n\nReturns:\n\n* `1` if successful, `0` if the message was not found (Number).\n\nExample:\n\n```javascript\nrsmq.deleteMessage({ qname: \"myqueue\", id: \"dhoiwpiirm15ce77305a5c3a3b0f230c6e20f09b55\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tif (resp === 1) {\n\t\tconsole.log(\"Message deleted.\")\n\t} else {\n\t\tconsole.log(\"Message not found.\")\n\t}\n});\n```\n\n#### popMessage(options, callback)\nReceive the next message from the queue **and delete it**.\n\n**Important:** This method deletes the message it receives right away. There is no way to receive the message again if something goes wrong while working on the message.\n\nParameters:\n\n* `qname` (String): The Queue name.\n\nReturns an object:\n\n  * `message` (String): The message's contents.\n  * `id` (String): The internal message id.\n  * `sent` (Number): Timestamp of when this message was sent / created.\n  * `fr` (Number): Timestamp of when this message was first received.\n  * `rc` (Number): Number of times this message was received.\n\nNote: Will return an empty object if no message is there\n\nExample:\n\n```javascript\nrsmq.popMessage({ qname: \"myqueue\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tif (resp.id) {\n\t\tconsole.log(\"Message received and deleted from queue\", resp)\n\t} else {\n\t\tconsole.log(\"No messages for me...\")\n\t}\n});\n```\n\n#### changeMessageVisibility(options, callback)\nChange the visibility timer of a single message.\nThe time when the message will be visible again is calculated from the current time (now) + `vt`.\n\nParameters:\n\n* `qname` (String): The Queue name.\n* `id` (String): The message id.\n* `vt` (Number): The length of time, in seconds, that this message will not be visible. Allowed values: 0-9999999 (around 115 days)\n\nReturns: \n\n* `1` if successful, `0` if the message was not found (Number).\n\nExample:\n\n```javascript\nrsmq.changeMessageVisibility({ qname: \"myqueue\", vt: \"60\", id: \"dhoiwpiirm15ce77305a5c3a3b0f230c6e20f09b55\" }, function (err, resp) {\n\tif (err) {\n\t\tconsole.error(err)\n\t\treturn\n\t}\n\n\tif (resp === 1) {\n\t\tconsole.log(\"message hidden for 60 seconds\")\n\t}\n});\n```\n\n    \n### quit(callback)\nDisconnect the redis client.\nThis is only useful if you are using rsmq within a script and want node to be able to exit.\n\n## Realtime\nWhen [initializing](#initialize) RSMQ you can enable the realtime PUBLISH for new messages. On every new message that gets sent to RSQM via `sendMessage` a Redis PUBLISH will be issued to `{rsmq.ns}:rt:{qname}`.\n\nExample for RSMQ with default settings:\n\n* The queue `testQueue` already contains 5 messages.\n* A new message is being sent to the queue `testQueue`.\n* The following Redis command will be issued: `PUBLISH rsmq:rt:testQueue 6`\n\n### How to use the realtime option\nBesides the PUBLISH when a new message is sent to RSMQ nothing else will happen. Your app could use the Redis SUBSCRIBE command to be notified of new messages and issue a `receiveMessage` then. However make sure not to listen with multiple workers for new messages with SUBSCRIBE to prevent multiple simultaneous `receiveMessage` calls. \n\n## Changes\nsee the [CHANGELOG](https://github.com/smrchy/rsmq/blob/master/CHANGELOG.md)\n\n## Other projects\n|Name|Description|\n|:--|:--|\n|[**node-cache**](https://github.com/tcs-de/nodecache)|Simple and fast Node.js internal caching. Node internal in memory cache like memcached.|\n|[**redis-tagging**](https://github.com/smrchy/redis-tagging)|A Node.js helper library to make tagging of items in any legacy database (SQL or NoSQL) easy and fast.|\n|[**redis-sessions**](https://github.com/smrchy/redis-sessions)|An advanced session store for Node.js and Redis|\n|[**rsmq-worker**](https://github.com/mpneuried/rsmq-worker)|Helper to implement a worker based on [RSMQ (Redis Simple Message Queue)](https://github.com/smrchy/rsmq).|\n|[**connect-redis-sessions**](https://github.com/mpneuried/connect-redis-sessions)|A connect or express middleware to use [redis sessions](https://github.com/smrchy/redis-sessions) that lets you handle multiple sessions per user_id.|\n\n## The MIT License\nPlease see the LICENSE.md file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmrchy%2Frsmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmrchy%2Frsmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmrchy%2Frsmq/lists"}