{"id":23873100,"url":"https://github.com/corverroos/rredis","last_synced_at":"2026-04-29T10:33:02.446Z","repository":{"id":57632604,"uuid":"411642956","full_name":"corverroos/rredis","owner":"corverroos","description":"Reflex stream client for redis streams","archived":false,"fork":false,"pushed_at":"2021-10-05T06:56:15.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T16:03:53.969Z","etag":null,"topics":["go","golang","golang-library","golang-package","redis","reflex","stream"],"latest_commit_sha":null,"homepage":"","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/corverroos.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}},"created_at":"2021-09-29T11:16:21.000Z","updated_at":"2021-10-05T06:56:18.000Z","dependencies_parsed_at":"2022-08-31T13:01:17.890Z","dependency_job_id":null,"html_url":"https://github.com/corverroos/rredis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corverroos/rredis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Frredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Frredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Frredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Frredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corverroos","download_url":"https://codeload.github.com/corverroos/rredis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Frredis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32421748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["go","golang","golang-library","golang-package","redis","reflex","stream"],"created_at":"2025-01-03T16:39:40.875Z","updated_at":"2026-04-29T10:33:02.432Z","avatar_url":"https://github.com/corverroos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rredis\n\nA [reflex](https://github.com/luno/reflex) stream client for a [redis streams](https://redis.io/topics/streams-intro) \nusing the [radix](https://github.com/mediocregopher/radix) client implementation.\n\nIt provides an API for inserting data into a stream and for consuming data from a stream with at-least-once semantics.\nIt also provides a reflex.CursorStore implementation for storing cursors in redis.\n\n### Usage\n\n```\n// Define your consumer business logic\nfn := func(ctx context.Context, fate fate.Fate, e *reflex.Event) error {\n  fmt.Print(\"Consuming redis stream event\", e)\n  return fate.Tempt() // Fate injects application errors at runtime, enforcing idempotent logic.\n}\n\n// Define some more variables\nvar namespace, streamName, redisAddr, consumerName string\nvar ctx context.Context  \n\n// Connect to redis\ncon, _ := radix.Dial(ctx, \"tcp\", redisAddr)\n\n// Setup rredis and reflex\nstream := rredis.NewStream(con, namespace, stream)\ncstore := rredis.NewCursorStore(con, namespace)\n\nconsumer := reflex.NewConsumer(consumerName, fn)\nspec := reflex.NewSpec(stream.Stream, cstore, consumer)\n\n// Insert some data concurrently\ngo func() {\n  for {\n    _ = stream.Insert(ctx, []byte(fmt.Sprint(time.Now())))\n    time.Sleep(time.Second)\n  }\n}()\n\n// Stream forever!\n// Progress is stored in the cursor store, so restarts or any error continue where it left off.\nfor {\n  err := reflex.Run(context.Backend(), spec)\n  if err != nil { // Note Run always returns non-nil error\n    log.Printf(\"stream error: %v\", err)\n  }\n}\n```\n\n## Notes\n\n- Since reflex events have specific fields (type, foreignID, timestamp, data) the redis stream entries need to adhere to a specific format. It is therefore advised to use Stream.Insert to ensure the correct format.\n- At-least-once semantics are also provided by redis consumer groups, but it doesn't provide strict ordering. rredis maintains strict ordering and can provide sharding using reflex/rpatterns.Parralel.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorverroos%2Frredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorverroos%2Frredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorverroos%2Frredis/lists"}