{"id":18317629,"url":"https://github.com/shimohq/tomqueue","last_synced_at":"2025-09-11T22:43:57.537Z","repository":{"id":57377853,"uuid":"65191439","full_name":"shimohq/tomqueue","owner":"shimohq","description":"A FIFO queue with group-level concurrency support","archived":false,"fork":false,"pushed_at":"2017-04-29T08:17:21.000Z","size":18,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-24T19:28:00.999Z","etag":null,"topics":["concurrency","fifo-queue","nodejs"],"latest_commit_sha":null,"homepage":null,"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/shimohq.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":null,"security":null,"support":null}},"created_at":"2016-08-08T09:30:24.000Z","updated_at":"2017-05-25T02:49:29.000Z","dependencies_parsed_at":"2022-09-19T19:02:08.418Z","dependency_job_id":null,"html_url":"https://github.com/shimohq/tomqueue","commit_stats":null,"previous_names":["shimohq/leopard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shimohq/tomqueue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimohq%2Ftomqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimohq%2Ftomqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimohq%2Ftomqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimohq%2Ftomqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shimohq","download_url":"https://codeload.github.com/shimohq/tomqueue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimohq%2Ftomqueue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274719570,"owners_count":25337237,"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-09-11T02:00:13.660Z","response_time":74,"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":["concurrency","fifo-queue","nodejs"],"created_at":"2024-11-05T18:06:57.756Z","updated_at":"2025-09-11T22:43:57.508Z","avatar_url":"https://github.com/shimohq.png","language":"JavaScript","readme":"# TomQueue\nA FIFO queue with group-level concurrency support\n\n## Install\n\n```shell\n$ npm install tomqueue\n```\n\n## Usage\n\nDispatcher:\n\n```javascript\nconst Dispatcher = require('tomqueue').Dispatcher;\nconst dispatcher = new Dispatcher({\n  port: 7446\n});\n\ndispatcher.start();\n\nsetTimeout(function () {\n  const payload = {\n    channel: 'abc',\n    baseRev: 67,\n    changeset: ''\n  };\n  dispatcher.send(payload).then((res) =\u003e {\n    console.log(res);\n  }).catch(console.error);\n}, 3000);\n```\n\nWorker:\n\n```javascript\nconst Worker = require('tomqueue').Worker;\nconst worker = new Worker({\n  handler(payload) {\n    return processChangeset(payload);\n  }\n});\n\nworker.start();\n\nfunction processChangeset(data) {\n  return Promise.resolve(data);\n}\n```\n\n## Payload\n\nThe method `Dispatcher#send()` receives a payload object, which must contain a `channel` property representing which channel the payload should be sent to.\n\n## Storage\n\nTomQueue supports two storages. The default storage is memory based. To switch to the redis-based storage, set `storage` option to `\"redis\"`:\n\n```javascript\nconst dispatcher = new Dispatcher({\n  port: 7446,\n  storage: 'redis',\n  storageOptions: {\n    redis: new Redis()\n  }\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimohq%2Ftomqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshimohq%2Ftomqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimohq%2Ftomqueue/lists"}