{"id":21487163,"url":"https://github.com/ntsd/cloudflare-queues-example","last_synced_at":"2026-05-20T03:32:19.771Z","repository":{"id":233056373,"uuid":"783718698","full_name":"ntsd/cloudflare-queues-example","owner":"ntsd","description":"example of how to use Cloudflare Worker with Queue to handle async tasks","archived":false,"fork":false,"pushed_at":"2024-04-12T22:45:31.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T19:47:53.205Z","etag":null,"topics":["cloudflare","cloudflare-queues","cloudflare-workers"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ntsd.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-08T12:44:52.000Z","updated_at":"2024-06-29T15:02:03.000Z","dependencies_parsed_at":"2024-04-13T08:09:14.165Z","dependency_job_id":"a81f19a5-bca7-49b0-802b-d541f7122515","html_url":"https://github.com/ntsd/cloudflare-queues-example","commit_stats":null,"previous_names":["ntsd/cloudflare-queues-examples"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fcloudflare-queues-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fcloudflare-queues-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fcloudflare-queues-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fcloudflare-queues-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntsd","download_url":"https://codeload.github.com/ntsd/cloudflare-queues-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014186,"owners_count":20383716,"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":["cloudflare","cloudflare-queues","cloudflare-workers"],"created_at":"2024-11-23T13:26:59.025Z","updated_at":"2026-05-20T03:32:14.748Z","avatar_url":"https://github.com/ntsd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Worker Queues Example\n\nThis is a basic example of how to use Cloudflare Worker with Queue to handle async tasks.\nThe example is pushing messages to a queue and the worker is consuming the messages and executing the task.\n\n1. The producer will receive HTTP request to push the message to the queue\n\n2. The consumer will consume the message and run the async task\n\nCloudflare Queue (Producer) -\u003e Cloudflare Worker (Consumer) -\u003e Async task\n\n## Requirements\n\n- Node\n\n## Instructions\n\nFollow the steps below to deploy the Cloudflare Worker Queue.\n\n### 1. Install packages\n\n`npm install`\n\n### 2. Add Secret\n\nTo add or update your Queue Auth Secret to can run the command below, or you can use the Cloudflare Web UI\n\n`npx wrangler secret put QUEUE_AUTH_SECRET`\n\n### 3. Deploy worker\n\nto deploy the worker, run the command below.\n\n`npm run deploy`\n\nIf you found the queue not found error you need to create a queue name `my-queue` on your Cloudflare.\n\n## Log worker\n\nto log the worker, run the command below.\n\n`npm run log`\n\n## Send test message\n\n```sh\nPOST / HTTP/1.1\nHost: your-worker-name.your-username.workers.dev\nAuthorization: your_queue_auth_key\nContent-Type: application/json\n\n{\n  \"data\": \"foo\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntsd%2Fcloudflare-queues-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntsd%2Fcloudflare-queues-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntsd%2Fcloudflare-queues-example/lists"}