{"id":22486749,"url":"https://github.com/yamalight/microwork","last_synced_at":"2025-09-24T22:31:00.112Z","repository":{"id":57296760,"uuid":"50927428","full_name":"yamalight/microwork","owner":"yamalight","description":"Microwork - simple creation of distributed scalable microservices in node.js with RabbitMQ","archived":false,"fork":false,"pushed_at":"2018-10-01T16:07:28.000Z","size":311,"stargazers_count":97,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-14T14:27:48.828Z","etag":null,"topics":["job-queue","microservices","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yamalight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-02-02T14:48:41.000Z","updated_at":"2023-03-11T17:09:10.000Z","dependencies_parsed_at":"2022-09-01T13:01:51.126Z","dependency_job_id":null,"html_url":"https://github.com/yamalight/microwork","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamalight%2Fmicrowork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamalight%2Fmicrowork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamalight%2Fmicrowork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamalight%2Fmicrowork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yamalight","download_url":"https://codeload.github.com/yamalight/microwork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234131312,"owners_count":18784416,"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":["job-queue","microservices","nodejs","rabbitmq"],"created_at":"2024-12-06T17:15:19.420Z","updated_at":"2025-09-24T22:30:54.755Z","avatar_url":"https://github.com/yamalight.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Microwork.js\n\n[![npm](https://img.shields.io/npm/v/microwork.svg)](https://www.npmjs.com/package/microwork)\n[![MIT](https://img.shields.io/npm/l/microwork.svg)](http://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/yamalight/microwork.svg?branch=master)](https://travis-ci.org/yamalight/microwork)\n[![Coverage Status](https://coveralls.io/repos/github/yamalight/microwork/badge.svg?branch=master)](https://coveralls.io/github/yamalight/microwork?branch=master)\n\nMicrowork.js is a library for simple creation of distributed scalable microservices in node.js with RabbitMQ.\n\n# Installation\n\n```sh\nnpm install --save microwork\n```\n\n# Requirements\n\nSince Microwork.js is written in ES6 and it uses async/await - it requires latest stable node (7.x or later).\n\n# Features\n\n- Simple interface for building distributed (micro)services\n- Easy way to scale services both horizontally (by adding more nodes) and vertically (by adding more subscribers)\n- Extensible with [plugins](docs/Plugins.md)\n\n# Usage\n\n## Quick start\n\nExample service that subscribe to messages from `do.work` topic and does some work with incoming data (in this case it just appends `world!` to incoming string):\n\n```js\nconst Microwork = require('microwork');\n\n// create task runner\nconst runner = new Microwork({host: 'your.rabbit.host', exchange: 'your.exchange'});\n// add worker to specific topic\nawait runner.subscribe('do.work', (msg, reply) =\u003e {\n  reply('response.topic', msg + ' world!');\n});\n// after work is done - cleanup\nawait runner.stop();\n```\n\nExample service that subscribes to messages from `response.topic` and logs them to console, as well as sends processing request to previously defined service:\n\n```js\nconst Microwork = require('microwork');\n\n// create master\nconst master = new Microwork({host: 'your.rabbit.host', exchange: 'your.exchange'});\n// listen for reply from workers\nawait master.subscribe('response.topic', msg =\u003e {\n  console.log(msg); // -\u003e \"hello world!\"\n});\n// send message to workers\nawait master.send('do.work', 'hello');\n\n// after work is done - cleanup\nawait master.stop();\n```\n\nFor more examples see project [documentation](docs/README.md).\n\n## License\n\n[MIT](http://www.opensource.org/licenses/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamalight%2Fmicrowork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyamalight%2Fmicrowork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamalight%2Fmicrowork/lists"}