{"id":15177400,"url":"https://github.com/sysulq/rsmq-go","last_synced_at":"2025-07-01T12:04:09.858Z","repository":{"id":257195505,"uuid":"839630375","full_name":"sysulq/rsmq-go","owner":"sysulq","description":"Go implementation of the Message Queue based on Redis Streams.","archived":false,"fork":false,"pushed_at":"2025-07-01T01:50:43.000Z","size":511,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T02:38:53.191Z","etag":null,"topics":["at-least-once","delay-queue","go","message-queue","opentelemetry","ratelimit","redis","redis-streams","retry","streams"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/sysulq/rsmq-go","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/sysulq.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,"zenodo":null}},"created_at":"2024-08-08T02:34:54.000Z","updated_at":"2025-07-01T01:50:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d69a9d2-2415-4303-bce4-b99e7a3c5135","html_url":"https://github.com/sysulq/rsmq-go","commit_stats":{"total_commits":71,"total_committers":2,"mean_commits":35.5,"dds":0.08450704225352113,"last_synced_commit":"b44a8f35723bd079375ffa5fc14deb06f94a5e85"},"previous_names":["sysulq/rsmq-go"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sysulq/rsmq-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Frsmq-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Frsmq-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Frsmq-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Frsmq-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysulq","download_url":"https://codeload.github.com/sysulq/rsmq-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Frsmq-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262959562,"owners_count":23391057,"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":["at-least-once","delay-queue","go","message-queue","opentelemetry","ratelimit","redis","redis-streams","retry","streams"],"created_at":"2024-09-27T14:21:59.098Z","updated_at":"2025-07-01T12:04:09.823Z","avatar_url":"https://github.com/sysulq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"rsmq-go\n===\n\n[![Go](https://github.com/sysulq/rsmq-go/actions/workflows/go.yml/badge.svg)](https://github.com/sysulq/rsmq-go/actions/workflows/go.yml)\n[![codecov](https://codecov.io/github/sysulq/rsmq-go/graph/badge.svg?token=A6FCMXFVTB)](https://codecov.io/github/sysulq/rsmq-go)\n\nGo implementation of the Message Queue based on Redis Streams.\n\n![rsmq](./assets/rsmq.excalidraw.png)\n\nWhy\n---\n\n- High performance and low latency\n- Easy to use and maintain with Redis\n\nFeatures\n---\n\n- Add message to the queue\n- Consume message from the queue\n- Auto-acknowledgment of message\n- Message delivery delay with specific timestamp\n- Message retry ability\n- Dead letter queue after retry limit\n- Auto clean idle consumer\n- Pending message processing\n- Distributed rate limiting\n- Tag filter for message\n- OpenTelemetry instrumentation\n\nInstallation\n---\n\n```bash\ngo get github.com/sysulq/rsmq-go\n```\n\nExample\n---\n\n```go\npackage rsmq_test\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/redis/go-redis/v9\"\n\t\"github.com/sysulq/rsmq-go\"\n)\n\nfunc Example_produceAndConsume() {\n\tcc := redis.NewClient(\u0026redis.Options{\n\t\tAddr: \"localhost:6379\",\n\t})\n\n\tqueue := rsmq.New(rsmq.Options{\n\t\tClient: cc,\n\t\tTopic:  \"example\",\n\t\tConsumeOpts: rsmq.ConsumeOpts{\n\t\t\tConsumerGroup:   \"task_group\",\n\t\t\tAutoCreateGroup: true,\n\t\t\tMaxConcurrency:  1,\n\t\t},\n\t})\n\tdefer queue.Close()\n\n\t// Produce tasks\n\tfor i := 0; i \u003c 10; i++ {\n\t\ttask := \u0026rsmq.Message{\n\t\t\tPayload: json.RawMessage(fmt.Sprintf(`{\"message\": \"Hello %d\"}`, i)),\n\t\t}\n\n\t\terr := queue.Add(context.Background(), task)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to enqueue task: %v\", err)\n\t\t}\n\t}\n\n\t// Consume tasks\n\tgo func() {\n\t\terr := queue.Consume(\n\t\t\tcontext.Background(),\n\t\t\tfunc(ctx context.Context, task *rsmq.Message) error {\n\t\t\t\tvar payload map[string]interface{}\n\t\t\t\t_ = json.Unmarshal(task.Payload, \u0026payload)\n\t\t\t\tfmt.Printf(\"Processing task, payload: %v\\n\", payload)\n\n\t\t\t\treturn nil\n\t\t\t},\n\t\t)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Error consuming tasks: %v\", err)\n\t\t}\n\t}()\n\n\ttime.Sleep(time.Second)\n\t// Output:\n\t// Processing task, payload: map[message:Hello 0]\n\t// Processing task, payload: map[message:Hello 1]\n\t// Processing task, payload: map[message:Hello 2]\n\t// Processing task, payload: map[message:Hello 3]\n\t// Processing task, payload: map[message:Hello 4]\n\t// Processing task, payload: map[message:Hello 5]\n\t// Processing task, payload: map[message:Hello 6]\n\t// Processing task, payload: map[message:Hello 7]\n\t// Processing task, payload: map[message:Hello 8]\n\t// Processing task, payload: map[message:Hello 9]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysulq%2Frsmq-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysulq%2Frsmq-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysulq%2Frsmq-go/lists"}