{"id":25369653,"url":"https://github.com/stanbubnoff/querator","last_synced_at":"2025-10-30T04:30:57.304Z","repository":{"id":63107714,"uuid":"564679978","full_name":"stanbubnoff/querator","owner":"stanbubnoff","description":"Universal NodeJS wrapper for working with RabbitMQ, Redis pub/sub, Kafka and other message queues.","archived":false,"fork":false,"pushed_at":"2022-11-15T07:36:02.000Z","size":174,"stargazers_count":5,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T10:16:05.486Z","etag":null,"topics":["broker","javascript","kafka","message-broker","message-queue","microservices","mqtt","nodejs","queue","queues","rabbit","rabbitmq","redis","typescript","zeromq"],"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/stanbubnoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2022-11-11T08:42:04.000Z","updated_at":"2024-02-18T15:22:56.000Z","dependencies_parsed_at":"2023-01-23T05:46:06.421Z","dependency_job_id":null,"html_url":"https://github.com/stanbubnoff/querator","commit_stats":null,"previous_names":["stanbubnoff/querator","stasbubnoff/querator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanbubnoff%2Fquerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanbubnoff%2Fquerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanbubnoff%2Fquerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stanbubnoff%2Fquerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stanbubnoff","download_url":"https://codeload.github.com/stanbubnoff/querator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238821463,"owners_count":19536223,"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":["broker","javascript","kafka","message-broker","message-queue","microservices","mqtt","nodejs","queue","queues","rabbit","rabbitmq","redis","typescript","zeromq"],"created_at":"2025-02-15T01:22:44.253Z","updated_at":"2025-10-30T04:30:56.913Z","avatar_url":"https://github.com/stanbubnoff.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ---\n\u003e # ATTENTION!\n\u003e \n\u003e The library is under development. For reference only.  \n\u003e The NPM package has all the latest changes, you can check the functionality in the current state.\n\u003e\n\u003e We also ask everyone who considers this project interesting and promising to put star on github! Also, you can help raise awareness of this library and share it on social media so that more people know about it. Thank you!\n\u003e    \n\u003e WELCOME TO CONTRIBUTORS!\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/img/querator_primary.png\" /\u003e\n\u003c/p\u003e\n\n## Universal NodeJS wrapper for working with RabbitMQ, Redis pub/sub, Kafka and other message queues.\n\n- [Motivation](#motivation)  \n- [How it works](#how-it-works) \n- [Usage](#usage)\n- [Engines](#engines) \n- [Roadmap](#roadmap)  \n- [Contributing](#contributing)  \n\n---\n## Motivation\n---\nDistributed systems are already practically the standard for modern application development. Message queues are a key link in such systems. At the same time, there are a lot of technologies that implement message queues, and choosing the right technology is a rather difficult task, and switching to another technology during the life cycle of an application brings with it a lot of overhead.\n\nQuerator implements a universal API for various message brokers such as RabbitMQ, Redis pub /sub, Kafka, ZeroMQ, MQTT and others.\n\n---\n## Engines\n---\n- RabbitMQ \u003c- [amqplib](https://github.com/amqp-node/amqplib)\n- Redis \u003c- [redis](https://github.com/redis/node-redis)\n- Kafka \u003c- [kafkajs](https://github.com/tulios/kafkajs) (not ported yet). HELP WANTED\n- MQTT \u003c- [MQTT.js](https://github.com/mqttjs/MQTT.js) (not ported yet). HELP WANTED\n- ZeroMQ \u003c- [zeromqjs](https://github.com/zeromq/zeromq.js) (not ported yet). HELP WANTED\n\n### Run engine for testing\n\n#### RabbitMQ\n``` properties\n$ docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3-management\n```\n[More info](https://hub.docker.com/_/rabbitmq)\n#### Redis\n``` properties\n$ docker run --name some-redis -d redis redis-server\n```\n[More info](https://hub.docker.com/_/redis)\n\n---\n## How it works\n---\nIn addition to certain patterns, all message queues follow the Publisher/Subscriber pattern. Querator hides the specific logic and methods of popular message queuing libraries and provides a single interface that makes it very easy to replace a previously chosen engine with another one.\n\nQuerator uses dynamic imports so you can be sure that only the selected engine is loaded.\n\nFor ease of use, we have added the ability to load the message broker configuration from a file of any of the popular formats: json, yaml, toml.\n\n---\n## Usage\n---\n### install\n``` properties\nnpm install querator\n```\nor\n``` properties\nyarn add querator\n```\n### Manual settings\n``` javascript\nimport { Querator } from 'querator'\n\nconst main = async () =\u003e {\n  const broker = new Querator({\n    engine: 'redis',\n    settings: {} // settings from engine library docs or empty for default settings\n  })\n\n  await broker.connect()\n\n  await broker.receive('test', (msg) =\u003e {\n    console.log(msg)\n  })\n\n  await broker.receive('test2', (msg) =\u003e {\n    console.log(msg)\n  })\n\n  setInterval(async () =\u003e {\n    await broker.publish('test', 'test')\n    await broker.publish('test2', 'test2')\n  }, 1000)\n}\n\nmain()\n```\n### Parse settings from file\n``` javascript\nimport { Querator } from 'querator'\n\nconst main = async () =\u003e {\n  const broker = new Querator({\n    engine: 'rabbitmq',\n    file: './config/rabbit_config.json' // .yaml, .yml, .toml\n  })\n\n  await broker.connect()\n\n  await broker.receive('test', (msg) =\u003e {\n    console.log(msg)\n  })\n\n  await broker.receive('test2', (msg) =\u003e {\n    console.log(msg)\n  })\n\n  setInterval(async () =\u003e {\n    await broker.publish('test', 'test')\n    await broker.publish('test2', 'test2')\n  }, 1000)\n}\n\nmain()\n```\n\n---\n## Roadmap\n---\n### For v1 release\n- add cluster settings\n- add specific methods for some engines\n- add schemas to validate engines settings\n- add ping method\n- add docs\n- 90%+ test coverege\n---\n## Contributing\n---\n\nThis library is fully supported by the community. If you can offer any help, then welcome to the team!\n\nPlease use StandardJS for code formatting and linting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanbubnoff%2Fquerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstanbubnoff%2Fquerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanbubnoff%2Fquerator/lists"}