{"id":16234167,"url":"https://github.com/zackify/amqp-modern","last_synced_at":"2025-04-08T07:41:54.342Z","repository":{"id":32846951,"uuid":"143050528","full_name":"zackify/amqp-modern","owner":"zackify","description":"Publish json messages and subscribe to AMQP servers using async / await","archived":false,"fork":false,"pushed_at":"2022-12-06T08:11:30.000Z","size":109,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-14T04:49:49.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zackify/amqp-modern","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zackify.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}},"created_at":"2018-07-31T18:11:55.000Z","updated_at":"2020-06-13T13:38:40.000Z","dependencies_parsed_at":"2023-01-14T22:25:19.690Z","dependency_job_id":null,"html_url":"https://github.com/zackify/amqp-modern","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Famqp-modern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Famqp-modern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Famqp-modern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Famqp-modern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zackify","download_url":"https://codeload.github.com/zackify/amqp-modern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247800965,"owners_count":20998331,"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":[],"created_at":"2024-10-10T13:15:12.568Z","updated_at":"2025-04-08T07:41:54.321Z","avatar_url":"https://github.com/zackify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## AMQP Modern\n\nA small `amqplib` wrapper for nodejs that simplifies interactions with queue systems.\n\n- Consuming a channel\n- Async / Await based\n- Publishing to a channel\n- Passing off JS objects, so you don't have to\n- It handles rejections and acknowledgments automatically\n\n## Install\n\n```\nnpm install amqp-modern\n```\n\n## Usage\n\n```js\nimport amqp from 'amqp-modern';\n\nlet client = amqp('amqp://connection string here');\n\n//optional config\nclient.config({\n  //catch and log any time a queue has an error\n  onError: error =\u003e console.log(error),\n  //wait 10 seconds after each failure, useful to not reject and retry instantly, probably looping really fast\n  rejectionDelay: 10000,\n});\n\n//consume a channel\nclient.consume({\n  channel: 'message',\n\n  process: async message =\u003e {\n    await sendAnEmail(message.description);\n    //if this promise rejects, the queue will retry\n  },\n});\n\n//somewhere in your app, publish to a channel\n\nclient.publish('message', { description: 'hello!' });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackify%2Famqp-modern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzackify%2Famqp-modern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackify%2Famqp-modern/lists"}