{"id":21825951,"url":"https://github.com/pior/fastjob","last_synced_at":"2026-05-20T04:32:29.671Z","repository":{"id":66713795,"uuid":"179610583","full_name":"pior/fastjob","owner":"pior","description":"Fast and robust job queue using GoogleCloud PubSub ☁️","archived":false,"fork":false,"pushed_at":"2019-04-08T16:02:26.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T08:14:48.756Z","etag":null,"topics":["google-pubsub","job-queue","pubsub"],"latest_commit_sha":null,"homepage":"","language":"Go","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/pior.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,"publiccode":null,"codemeta":null}},"created_at":"2019-04-05T02:55:19.000Z","updated_at":"2019-04-08T16:02:28.000Z","dependencies_parsed_at":"2023-03-01T12:15:33.763Z","dependency_job_id":null,"html_url":"https://github.com/pior/fastjob","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/pior%2Ffastjob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Ffastjob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Ffastjob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pior%2Ffastjob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pior","download_url":"https://codeload.github.com/pior/fastjob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244795427,"owners_count":20511519,"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":["google-pubsub","job-queue","pubsub"],"created_at":"2024-11-27T18:03:03.778Z","updated_at":"2026-05-20T04:32:29.644Z","avatar_url":"https://github.com/pior.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastjob\n\n[![GoDoc](https://godoc.org/github.com/pior/fastjob?status.svg)](https://godoc.org/github.com/pior/fastjob)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pior/fastjob)](https://goreportcard.com/report/github.com/pior/fastjob)\n[![CircleCI](https://circleci.com/gh/pior/fastjob.svg?style=svg)](https://circleci.com/gh/pior/fastjob)\n[![codecov](https://codecov.io/gh/pior/fastjob/branch/master/graph/badge.svg)](https://codecov.io/gh/pior/fastjob)\n\nFastjob is a fast and robust job queue using GoogleCloud PubSub 🛰\n\n**Work In Progress**\n\nDesign objectives:\n- Robustness: never lose a job.\n- Reliability: never let the main queue be blocked by failing jobs.\n\nStrategies:\n- Robustness: only one external dependencies: PubSub.\n- Robustness: the durability is garanteed by PubSub.\n- Reliability: the core features are mostly only the PubSub semantics and features (but extensible).\n- Reliability: route failing jobs to a dead letter queue.\n\n## Usage\n\n#### Define a job:\n\n```golang\ntype PingHTTP struct{\n    Url string\n}\n\nfunc (m *PingHTTP) Name() string {\n\treturn \"PingHTTP\"\n}\n\nfunc (m *PingHTTP) Perform(ctx context.Context) error {\n    _, err := http.Post(m.Url)\n\treturn err\n}\n```\n\nNote: the job will be JSON encoded, only **public** fields should be used to define the job inputs.\n\n\n#### Register the job:\n\n```golang\nregistry := fastjob.NewRegistry().WithJob(\u0026PingHTTP{})\n```\n\n#### Run the worker:\n\n```golang\nclient, err := pubsub.NewClient(ctx, \"my-gcp-project-id\")\nsub := client.Subscription(\"sub-test\")\nconfig := fastjob.NewConfig(registry)\n\nworker := fastjob.NewPubsubWorker(config, sub)\nworker.Run(ctx)\n```\n\n#### Enqueue a job:\n\n```golang\nrunner := fastjob.NewPubSubRunner(client, topicName)\n\njob := \u0026PingHTTP{Url: \"http://example.org/hello\"}\nerr = runner.Enqueue(ctx, job)\n```\n\n#### Use a local runner for testing:\n\n```golang\nrunner := fastjob.NewLocalRunner()\n\nerr = runner.Enqueue(ctx, job)\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpior%2Ffastjob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpior%2Ffastjob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpior%2Ffastjob/lists"}