{"id":26518905,"url":"https://github.com/vegris/pachka","last_synced_at":"2025-07-02T07:06:33.509Z","repository":{"id":272427150,"uuid":"916550686","full_name":"vegris/pachka","owner":"vegris","description":"Message batching library for Elixir applications","archived":false,"fork":false,"pushed_at":"2025-01-15T14:44:47.000Z","size":89,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T21:48:31.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vegris.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":"2025-01-14T10:15:44.000Z","updated_at":"2025-03-29T21:45:16.000Z","dependencies_parsed_at":"2025-01-14T11:43:15.429Z","dependency_job_id":"5630705a-b6e3-46c0-ab52-e4937a6c4f4b","html_url":"https://github.com/vegris/pachka","commit_stats":null,"previous_names":["vegris/pachka"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vegris/pachka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fpachka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fpachka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fpachka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fpachka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vegris","download_url":"https://codeload.github.com/vegris/pachka/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fpachka/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261256226,"owners_count":23131498,"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":"2025-03-21T10:16:26.381Z","updated_at":"2025-07-02T07:06:33.484Z","avatar_url":"https://github.com/vegris.png","language":"Elixir","funding_links":[],"categories":["Utilities"],"sub_categories":[],"readme":"# Pachka\n\n[![Hex.pm Version](https://img.shields.io/hexpm/v/pachka)](https://hex.pm/packages/pachka)\n[![Documentation](https://img.shields.io/badge/documentation-gray)](https://hexdocs.pm/pachka/)\n[![CI](https://github.com/vegris/pachka/actions/workflows/ci.yml/badge.svg)](https://github.com/vegris/pachka/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/vegris/pachka/badge.svg?branch=main)](https://coveralls.io/github/vegris/pachka?branch=main)\n\nPachka is a message batching library for Elixir.\n\nIt provides a reliable way to collect messages and deliver them in batches to configurable destinations.\nMessages are buffered until either the batch size limit is reached or the batch timeout occurs.\nFailed deliveries are automatically retried with configurable backoff strategies.\n\n## Features\n\n* Configurable batch sizes and timeouts\n* Customizable message sinks for different delivery targets\n* Automatic retries with customizable backoff\n* Overload protection with queue size limits\n* Graceful shutdown with message draining\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:pachka, \"~\u003e 1.0.0\"}\n  ]\nend\n```\n\n## Usage\n\n1. Define a sink module that implements the `Pachka.Sink` behavior:\n\n```elixir\ndefmodule MyApp.MessageSink do\n  @behaviour Pachka.Sink\n  \n  @impl true\n  def send_batch(messages, _server_value) do\n    # Process messages in batch\n    :ok\n  end\nend\n```\n\n2. Start Pachka server:\n\n```elixir\n{:ok, pid} = Pachka.start_link(\n  name: MyPachka,\n  sink: MyApp.MessageSink,\n  max_batch_size: 100,\n  max_batch_delay: :timer.seconds(1)\n)\n```\n\n3. Send messages:\n\n```elixir\n:ok = Pachka.send_message(MyPachka, %{event: \"user_login\"})\n:ok = Pachka.send_message(MyPachka, %{event: \"page_view\"})\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegris%2Fpachka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvegris%2Fpachka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegris%2Fpachka/lists"}