{"id":24041786,"url":"https://github.com/daichitakahashi/cf-eventhub","last_synced_at":"2026-05-06T06:40:48.222Z","repository":{"id":258231493,"uuid":"859314189","full_name":"daichitakahashi/cf-eventhub","owner":"daichitakahashi","description":"Event Hub works with Cloudflare Workers and Queues","archived":false,"fork":false,"pushed_at":"2025-10-05T14:29:29.000Z","size":783,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-20T06:02:55.167Z","etag":null,"topics":["cloudflare","cloudflare-queues","cloudflare-workers","eventhub","fan-out","iac","postgresql","pulumi","pulumi-typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cf-eventhub","language":"TypeScript","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/daichitakahashi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-18T13:05:11.000Z","updated_at":"2025-10-05T14:29:31.000Z","dependencies_parsed_at":"2024-10-18T04:18:35.100Z","dependency_job_id":"f3860091-1f85-4247-aea2-d00a271e359e","html_url":"https://github.com/daichitakahashi/cf-eventhub","commit_stats":null,"previous_names":["daichitakahashi/cf-eventhub"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daichitakahashi/cf-eventhub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daichitakahashi%2Fcf-eventhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daichitakahashi%2Fcf-eventhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daichitakahashi%2Fcf-eventhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daichitakahashi%2Fcf-eventhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daichitakahashi","download_url":"https://codeload.github.com/daichitakahashi/cf-eventhub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daichitakahashi%2Fcf-eventhub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285382190,"owners_count":27162159,"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-11-20T02:00:05.334Z","response_time":54,"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":["cloudflare","cloudflare-queues","cloudflare-workers","eventhub","fan-out","iac","postgresql","pulumi","pulumi-typescript"],"created_at":"2025-01-08T22:12:27.920Z","updated_at":"2026-05-06T06:40:48.206Z","avatar_url":"https://github.com/daichitakahashi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cf-eventhub\n\nDeveloping message hub that works with Cloudflare Workers and Queues with following functionalities.\n\n- Configure destinations of each message in IaC(currently, we will support Pulumi)\n- Record execution info including lost job(**Cloudflare Queues is Beta**)\n\n## Designs\n### Sequence\n\n```mermaid\nsequenceDiagram\n  participant Worker1 as Worker(producer)\n  participant eventhub as eventhub\n  participant Queue as Queue\n  participant DB\n  participant executor as executor\n  participant Worker2 as Worker(consumer)\n\n  autonumber\n  Worker1 -\u003e\u003e eventhub: emit() [RPC]\n  activate eventhub\n  eventhub -\u003e\u003e eventhub: routing\n  eventhub -\u003e\u003e DB: begin\n  activate DB\n  eventhub -\u003e\u003e DB: save event payload\n  opt if routes matched\n    eventhub -\u003e\u003e DB: create dispatches of the event\u003cbr\u003efor matched routes\n    eventhub -\u003e\u003e Queue: enqueue dispatches\n    activate Queue\n  end\n  eventhub -\u003e\u003e DB: commit\n  deactivate DB\n  eventhub --\u003e\u003e Worker1: return Promise\u003cvoid\u003e\n  deactivate eventhub\n\n  Queue -\u003e\u003e Queue: wait delaySeconds\n\n  par execute each dispatch\n    Queue -\u003e\u003e executor: dequeue dispatch for matched route\n    activate executor\n    executor -\u003e\u003e DB: begin\n    activate DB\n    executor -\u003e\u003e DB: load payload\u003cbr\u003e(UPDATE RETURNING)\n    opt dispatch is found and not completed\n      executor -\u003e\u003e Worker2: handle() [RPC]\n      activate Worker2\n      Worker2 -\u003e\u003e Worker2: event handling\n      Worker2 --\u003e\u003e executor: return\u003cbr\u003ePromise\u003c\"complete\" | \"ignored\" | \"failed\"\u003e\n      deactivate Worker2\n      executor -\u003e\u003e DB: record execution with its status\n      opt execution succeeds or max retry exceeded\n        executor -\u003e\u003e DB: record dispatch result\n      end\n    end\n    executor -\u003e\u003e DB: commit\n    deactivate DB\n\n    executor -\u003e\u003e Queue: ack() on \"complete\" | \"ignored\" | \"misconfigured\" | \"notfound\"\u003cbr\u003eor\u003cbr\u003eretry() on \"failed\"\n    deactivate executor\n    deactivate Queue\n  end\n```\n\n## To run demo\n1. Launch demo workers\n    ```shell\n    $ pnpm --filter cf-eventhub --filter web-console build\n    $ pnpm dev\n    ```\n2. Open `http://localhost:3011` in your browser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaichitakahashi%2Fcf-eventhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaichitakahashi%2Fcf-eventhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaichitakahashi%2Fcf-eventhub/lists"}