{"id":42365858,"url":"https://github.com/pc-1827/distributed-job-queue","last_synced_at":"2026-01-27T18:20:31.142Z","repository":{"id":246079773,"uuid":"818709269","full_name":"pc-1827/distributed-job-queue","owner":"pc-1827","description":"Simple Queue package for handling distributed jobs in NodeJS.","archived":false,"fork":false,"pushed_at":"2024-11-28T21:32:06.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-25T07:54:34.759Z","etag":null,"topics":["delayed-job","job","job-queue","nodejs","priority","queue","rate-limiter"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/distributed-job-queue","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/pc-1827.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-22T16:19:53.000Z","updated_at":"2024-11-28T21:32:10.000Z","dependencies_parsed_at":"2024-07-25T18:30:13.802Z","dependency_job_id":"6f3e29f7-2fc7-45e2-9061-3222bbcd0568","html_url":"https://github.com/pc-1827/distributed-job-queue","commit_stats":null,"previous_names":["pc-1827/distributed-job-queue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pc-1827/distributed-job-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pc-1827%2Fdistributed-job-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pc-1827%2Fdistributed-job-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pc-1827%2Fdistributed-job-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pc-1827%2Fdistributed-job-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pc-1827","download_url":"https://codeload.github.com/pc-1827/distributed-job-queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pc-1827%2Fdistributed-job-queue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28817797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:01:38.485Z","status":"ssl_error","status_checked_at":"2026-01-27T18:01:27.499Z","response_time":168,"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":["delayed-job","job","job-queue","nodejs","priority","queue","rate-limiter"],"created_at":"2026-01-27T18:20:30.325Z","updated_at":"2026-01-27T18:20:31.123Z","avatar_url":"https://github.com/pc-1827.png","language":"JavaScript","readme":"# Distributed Job Queue\n\n### What is Distributed Job Queue?\n\nDistributed Job Queue is a [Node.js library](https://www.npmjs.com/package/distributed-job-queue) that provides a fast and robust job processing system based on Redis.\n\nWhile it is possible to implement queues using raw Redis commands, this library offers an API that abstracts away the low-level details and enhances Redis's basic functionality. This allows you to handle more complex use cases with ease.\n\nRefer to [docs](https://github.com/pc-1827/distributed-job-queue/blob/master/docs/REFERENCE.MD) for more information on how to use the library and its features.\n\nYou can use the [job-queue-dashboard](https://github.com/pc-1827/job-queue-dashboard) UI for monitoring jobs in the queue.\n\nThis project is heavily inspired by [Bull](https://github.com/OptimalBits/bull).\n\n\n### Getting Started\n\nDistributed Job Queue is available as a public npm package and can be installed using npm\n\n```bash\n$ npm install distributed-job-queue --save\n\n```\n\n### Queues\n\nA queue is simply created by instantiating a Queue instance:\n\n```js\nconst myFirstQueue = new Queue('my-first-queue');\n```\n\nA queue instance can normally have 2 main roles: A job producer and job consumer.\n\nThe producer and consumer can divided into several instances. A given queue, always referred to by its instantiation name ( my-first-queue in the example above ), can have many producers and consumers. An important aspect is that producers can add jobs to a queue even if there are no consumers available at that moment: queues provide asynchronous communication, which is one of the features that makes them so powerful.\n\nConversely, you can have one or more workers consuming jobs from the queue, which will consume the jobs in a given order: FIFO or according to priorities.\n\n### Producers\n\nA job producer is a Node.js program that adds jobs to a queue:\n\n```js\nconst jobData = {\n    task: 'sendEmail',\n    to: 'user@example.com',\n    subject: 'Welcome!',\n    body: 'Hello, welcome to our service!',\n};\n\nconst jobOptions = {\n    priority: 1, // Lower number means higher priority\n    attempts: 3, // Number of retry attempts if the job fails\n};\n\nmyFirstQueue.addJobs(jobData, jobOptions)\n```\n\nA job is simply a JavaScript object that needs to be serializable (i.e., JSON stringify-able) to be stored in Redis. You can also provide an options object with additional job settings.\n\n### Consumers\n\nA consumer, or worker, is a Node.js program that defines a process function to handle jobs:\n\n```js\nburgerQueue.processJobs((job, done) =\u003e {\n   doSomething(job)\n}, 5);\n```\n\nThe process function is called whenever the worker is idle and there are jobs to process. The queue could have many jobs waiting, and the process function will be busy processing them one by one until all are completed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpc-1827%2Fdistributed-job-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpc-1827%2Fdistributed-job-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpc-1827%2Fdistributed-job-queue/lists"}