{"id":20762536,"url":"https://github.com/welllog/omq","last_synced_at":"2026-04-24T19:32:52.353Z","repository":{"id":144341313,"uuid":"487216588","full_name":"welllog/omq","owner":"welllog","description":"message","archived":false,"fork":false,"pushed_at":"2024-07-05T02:58:57.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T17:47:54.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/welllog.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":"2022-04-30T07:53:14.000Z","updated_at":"2024-07-05T02:57:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e4c06b5-83a4-41ac-ba0d-16652a435a1a","html_url":"https://github.com/welllog/omq","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/welllog/omq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welllog%2Fomq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welllog%2Fomq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welllog%2Fomq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welllog%2Fomq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welllog","download_url":"https://codeload.github.com/welllog/omq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welllog%2Fomq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32238471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: 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":[],"created_at":"2024-11-17T10:36:02.316Z","updated_at":"2026-04-24T19:32:52.334Z","avatar_url":"https://github.com/welllog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# omq\nmessage\n\n###### Currently only redis-based message queues are implemented\n\n#### USAGE\n\n```go\nqueue := redisq.NewQueue(redisClient, \"queue_name\", rediq.WithPartitionNum(4))\nqueue.Produce(\u0026omq.Message{\n    Topic: \"topic_name\",\n    Payload: NewPayloadJsonEncoder(map[string]string{\"name\": \"test\"}),\n    DelayAt: time.Now().Add(time.Second)\n})\nqueue.Produce(\u0026omq.Message{\n    Topic: \"topic_name\",\n    Payload: ByteEncoder(\"words\"),\n})\nctx, cancel := context.WithCancel(context.Background())\nfetcher, _ := queue.Fetcher(ctx, 0)\n\nquit := make(chan os.Signal)\nsignal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)\ngo func() {\n    \u003c-quit\n    cancel()\n}()\n\nfor msg := range fetcher.Messages() {\n    // TODO\n    fetcher.Commit(ctx, msg)\n}\n```\n\n#### FEATURE\nProgram crashes usually result in lost messages, to avoid this, the library supports retry, When this property is set, the task being processed will be cached.\nOnce the cached task exceeds the commitTimeout, it will re-enter the queue\n```go\nqueue := redisq.NewQueue(redisClient, \"queue_name\", \n\tredisq.WithMaxRetry(3), // Retry up to 3 times\n\tredisq.WithCommitTimeout(10), // When the number of retries is set greater than 0, re-enter the queue and retry if it is not submitted for more than 10 seconds\n)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelllog%2Fomq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelllog%2Fomq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelllog%2Fomq/lists"}