{"id":13835040,"url":"https://github.com/elixir-lang/gen_stage","last_synced_at":"2025-05-11T03:40:06.156Z","repository":{"id":1954649,"uuid":"41441223","full_name":"elixir-lang/gen_stage","owner":"elixir-lang","description":"Producer and consumer actors with back-pressure for Elixir","archived":false,"fork":false,"pushed_at":"2025-02-09T09:56:19.000Z","size":1383,"stargazers_count":1542,"open_issues_count":4,"forks_count":194,"subscribers_count":56,"default_branch":"main","last_synced_at":"2025-05-07T23:04:42.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://hexdocs.pm/gen_stage","language":"Elixir","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/elixir-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-08-26T17:57:36.000Z","updated_at":"2025-05-06T14:43:25.000Z","dependencies_parsed_at":"2023-07-05T16:00:44.441Z","dependency_job_id":"64535d1d-ba7c-48cd-a653-edd8ea56bd36","html_url":"https://github.com/elixir-lang/gen_stage","commit_stats":{"total_commits":514,"total_committers":100,"mean_commits":5.14,"dds":0.3929961089494164,"last_synced_commit":"d5bb86ca17f52e9b93dd447cf8871c3923a35cd9"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-lang%2Fgen_stage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-lang%2Fgen_stage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-lang%2Fgen_stage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-lang%2Fgen_stage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-lang","download_url":"https://codeload.github.com/elixir-lang/gen_stage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968114,"owners_count":21833251,"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":[],"created_at":"2024-08-04T14:00:55.407Z","updated_at":"2025-05-07T23:04:48.121Z","avatar_url":"https://github.com/elixir-lang.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":[],"readme":"# GenStage\n\nGenStage is a specification for exchanging events between producers and consumers.\n\nThis project currently provides the following functionality:\n\n  * `GenStage` ([docs](https://hexdocs.pm/gen_stage/GenStage.html)) - a behaviour for implementing producer and consumer stages\n\n  * `ConsumerSupervisor` ([docs](https://hexdocs.pm/gen_stage/ConsumerSupervisor.html)) - a supervisor designed for consuming events from GenStage and starting a child process per event\n\nYou may also be interested in two other projects built on top of GenStage:\n\n  * [Flow](https://github.com/plataformatec/flow) for building computational flows using map-reduce, partitions, windows, and more that run concurrently. See the documentation for [Flow](https://hexdocs.pm/flow) or [José Valim's keynote at ElixirConf 2016](https://youtu.be/srtMWzyqdp8?t=244) introducing the main concepts behind GenStage and Flow\n\n  * [Broadway](https://github.com/plataformatec/broadway) for building concurrent and multi-stage data ingestion and data processing pipelines to consume events from Amazon SQS, RabbitMQ, and others. See [Broadway's documentation](https://hexdocs.pm/broadway) or [José Valim's introduction to Broadway](https://www.youtube.com/watch?v=ZOExnT1PYjs)\n\n## Examples\n\nExamples for using GenStage and ConsumerSupervisor can be found in the [examples](examples) directory:\n\n  * [ProducerConsumer](examples/producer_consumer.exs) - a simple example of setting up a pipeline of `A -\u003e B -\u003e C` stages and having events flowing through it\n\n  * [ConsumerSupervisor](examples/consumer_supervisor.exs) - an example of how to use one or more `ConsumerSupervisor` as a consumer to a producer that works as a counter\n\n  * [GenEvent](examples/gen_event.exs) - an example of how to use `GenStage` to implement an alternative to `GenEvent` that leverages concurrency and provides more flexibility regarding buffer size and back-pressure\n\n  * [RateLimiter](examples/rate_limiter.exs) - an example of performing rate limiting in a GenStage pipeline\n\n## Installation\n\nGenStage requires Elixir v1.5. Just add `:gen_stage` to your list of dependencies in mix.exs:\n\n```elixir\ndef deps do\n  [{:gen_stage, \"~\u003e 1.0\"}]\nend\n```\n\n## License\n\nSame as Elixir under Apache License 2.0.\nCheck [NOTICE](https://github.com/elixir-lang/elixir/blob/main/NOTICE) and [LICENSE](https://github.com/elixir-lang/elixir/blob/main/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-lang%2Fgen_stage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-lang%2Fgen_stage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-lang%2Fgen_stage/lists"}