{"id":20765389,"url":"https://github.com/bringg/node-arnavmq","last_synced_at":"2026-02-15T12:03:12.749Z","repository":{"id":38334070,"uuid":"312061083","full_name":"bringg/node-arnavmq","owner":"bringg","description":"ArnavMQ is an amqp.node wrapper to ease common AMQP usages (RPC, pub/sub, channel/connection handling etc...)","archived":false,"fork":false,"pushed_at":"2026-02-07T13:17:46.000Z","size":1799,"stargazers_count":20,"open_issues_count":2,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2026-02-07T22:10:21.712Z","etag":null,"topics":["amqp","javascript","nodejs","rabbitmq"],"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/bringg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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":"2020-11-11T18:52:21.000Z","updated_at":"2026-01-05T16:57:34.000Z","dependencies_parsed_at":"2023-02-19T16:46:16.904Z","dependency_job_id":"48cf9063-1e13-4dcd-a429-1a5ff901d567","html_url":"https://github.com/bringg/node-arnavmq","commit_stats":{"total_commits":408,"total_committers":24,"mean_commits":17.0,"dds":0.5931372549019608,"last_synced_commit":"21a78597541bccbae1fc06ac40663882a4cfdb74"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/bringg/node-arnavmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringg%2Fnode-arnavmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringg%2Fnode-arnavmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringg%2Fnode-arnavmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringg%2Fnode-arnavmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bringg","download_url":"https://codeload.github.com/bringg/node-arnavmq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringg%2Fnode-arnavmq/sbom","scorecard":{"id":254005,"data":{"date":"2025-08-11","repo":{"name":"github.com/bringg/node-arnavmq","commit":"ff1f5eaf92d12bdb45fe823007acda5bb1ebbb59"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/bringg/node-arnavmq/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/bringg/node-arnavmq/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/bringg/node-arnavmq/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/bringg/node-arnavmq/ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:30","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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/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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:33"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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"}}]},"last_synced_at":"2025-08-17T09:09:50.706Z","repository_id":38334070,"created_at":"2025-08-17T09:09:50.706Z","updated_at":"2025-08-17T09:09:50.706Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29477305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["amqp","javascript","nodejs","rabbitmq"],"created_at":"2024-11-17T11:16:37.106Z","updated_at":"2026-02-15T12:03:12.716Z","avatar_url":"https://github.com/bringg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArnavMQ\n\n[![npm](https://img.shields.io/npm/v/arnavmq.svg)](https://www.npmjs.com/package/arnavmq)\n[![CI](https://github.com/bringg/node-arnavmq/workflows/CI/badge.svg)](https://github.com/bringg/node-arnavmq/actions?query=branch%3Amaster)\n\n**Disclaimer**:\n\nThis project is a hard-fork of [dial-once/node-bunnymq](https://github.com/dial-once/node-bunnymq).\nThe original project seems like not maintained anymore, in fact most recent releases in the original repo were driven by the people who are maintaining this fork.\n\nMany thanks the original authors of `bunnymq` for their work and for such an easy to use library.\nWith this fork we aim to fix all outstading bugs, make the library more stable, and continue adding features as needed.\n\nIn order to avoid confusion with the original project we decided to rename it to `ArnavMQ`.\nArnav (**ארנב**) is a Hebrew word which means Rabbit, yes how original ;) .\n\n## About\n\n**ArnavMQ** is an `amqp.node` wrapper to ease common AMQP usages (RPC, pub/sub, channel/connection handling etc...)\n\n### Features\n\n- Subscriber (consumer)\n- Publisher (producer)\n- RPC (get answers from subscriber automatically)\n- Auto connect/reconnect/queue messages\n- Handle errors and re-queing when message callback fails\n- Messages types caring using AMQP headers for content type (send as objects and receive as objects)\n\n## Installation\n\n```shell\nnpm install arnavmq\n```\n\n## Basic usage\n\n### Publisher\n\nProducer (publisher), can send messages to a named queue.\n\n```javascript\nconst arnavmq = require('arnavmq')({ host: 'amqp://localhost' });\narnavmq.publish('queue:name', 'Hello World!');\n```\n\n### Subscriber\n\nConsumer (subscriber), can handle messages from a named queue.\n\n```javascript\nconst arnavmq = require('arnavmq')({ host: 'amqp://localhost' });\n\narnavmq.subscribe('queue:name', function (msg) {\n  // msg is the exact item sent by a producer as payload\n  // if it is an object, it is already parsed as object\n});\n```\n\nYou can pass to consumer options, like:\n\n```javascript\nconst arnavmq = require('arnavmq')({ host: 'amqp://localhost' });\n\nconst options = {\n  persistent: true,\n  durable: true,\n  channel: {\n    // You can override the global prefetch for this specific consumer\n    //\n    // Calling multiple times to \"subscribe\" with same queue but different custom prefetch\n    // will throw an error\n    prefetch: 10,\n  },\n};\n\narnavmq.subscribe('queue:name', options, function (msg) {\n  // msg is the exact item sent by a producer as payload\n  // if it is an object, it is already parsed as object\n});\n```\n\n## RPC Support\n\nYou can create RPC requests easily by adding the `rpc: true` option to the `produce` call:\n\n```javascript\narnavmq.subscribe('queue:name', function () {\n  return 'hello world!'; // you can also return a promise if you want to do async stuff\n});\n\narnavmq.publish('queue:name', { message: 'content' }, { rpc: true, timeout: 1000 }).then(function (consumerResponse) {\n  console.log(consumerResponse); // prints hello world!\n});\n```\n\nThe optional `timeout` option results in a rejection when no answer has been received after the given amount of milliseconds.\nWhen '0' is given, there will be no timeout for this call.\nThis value will overwrite the default timeout set in the config in `rpcTimeout`.\n\n## Routing keys\n\nYou can send publish commands with routing keys (thanks to @nekrasoft)\n\n```javascript\narnavmq.publish('queue:name', { message: 'content' }, { routingKey: 'my-routing-key' });\n```\n\n## Hooks\n\nYou can register callbacks to be invoked on certain events:\n\n```javascript\nconst arnavmq = require('arnavmq')({\n  host: 'amqp://localhost',\n  // Can pass hooks directly on connection configuration.\n  hooks: {\n    connection: {\n      beforeConnect: () =\u003e {\n        /*...*/\n      },\n    },\n  },\n});\n\narnavmq.hooks.connection.afterConnect(({ connection, config }) =\u003e {\n  console.log('Connected to ' + config.host);\n});\n\narnavmq.hooks.producer.beforeProduce(({ properties /*... other parameters ...*/ }) =\u003e {\n  // Message properties and other options objects can be changed, for example to set a message id:\n  properties.messageId = randomUUID();\n});\n\n// Can register a single callback at a time or multiple callbacks at once.\narnavmq.hooks.consumer.afterProcessMessage([afterProcessCallback1, afterProcessCallback2]);\n```\n\nFor full details of the available hooks and callback signatures, check the documentation on the files:\n\n- [Connection](src/modules/hooks/connection_hooks.js)\n- [Consumer](src/modules/hooks/consumer_hooks.js)\n- [Producer](src/modules/hooks/producer_hooks.js)\n\n## Config\n\nYou can specify a config object, properties and default values are:\n\n```javascript\nconst arnavmq = require('arnavmq')({\n  // amqp connection string\n  host: 'amqp://localhost',\n\n  // number of fetched messages at once on the channel\n  prefetch: 5,\n\n  // requeue put back message into the broker if consumer crashes/trigger exception\n  requeue: true,\n\n  // time between two reconnect (ms)\n  timeout: 1000,\n\n  // the maximum number of retries when trying to send a message before throwing error when failing. If set to '0' will not retry. If set to less then '0', will retry indefinitely.\n  producerMaxRetries: -1,\n\n  // default timeout for RPC calls. If set to '0' there will be none.\n  rpcTimeout: 1000,\n\n  // suffix all queues names\n  // ex: service-something with suffix :ci becomes service-suffix:ci etc.\n  consumerSuffix: '',\n\n  // generate a hostname so we can track this connection on the broker (rabbitmq management plugin)\n  hostname: process.env.HOSTNAME || process.env.USER || crypto.randomUUID(),\n\n  /**\n   * A logger object with a log function for each of the log levels (\"debug\", \"info\", \"warn\", or \"error\").\n   * Each log function receives one parameter containing a log event with the following fields:\n   * * message - A string message describing the event. Always present.\n   * * error - An 'Error' object in case one is present.\n   * * params - An optional object containing extra parameters that can provide extra context for the event.\n   */\n  logger: utils.emptyLogger,\n});\n```\n\nYou can override any or no of the property above.\n\n**Note:** if you enable the debug mode using the `AMQP_DEBUG=true` env var, but you do not attach any logger, the module will fallback to console.\n\n## Documentation \u0026 resources\n\nFind more about RabbitMQ in the links below:\n\n- \u003chttp://www.rabbitmq.com/getstarted.html\u003e\n- \u003chttps://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rabbitmq.html\u003e\n- \u003chttp://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/\u003e\n\n## Tests\n\nRequirements:\n\n- docker\n- npm\n\nRun `npm i` once and then `npm test` to launch the test suite.\n\n## License\n\nThe MIT License [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbringg%2Fnode-arnavmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbringg%2Fnode-arnavmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbringg%2Fnode-arnavmq/lists"}