{"id":32166821,"url":"https://github.com/dplummer/kaffeine","last_synced_at":"2026-02-18T22:02:02.287Z","repository":{"id":57511484,"uuid":"88563349","full_name":"dplummer/kaffeine","owner":"dplummer","description":"Elixir framework for consuming kafka events","archived":false,"fork":false,"pushed_at":"2017-12-06T23:31:17.000Z","size":42,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-14T18:44:42.008Z","etag":null,"topics":["elixir","kafka"],"latest_commit_sha":null,"homepage":null,"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/dplummer.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":"2017-04-18T00:29:46.000Z","updated_at":"2023-09-06T17:39:30.000Z","dependencies_parsed_at":"2022-08-29T05:20:53.265Z","dependency_job_id":null,"html_url":"https://github.com/dplummer/kaffeine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dplummer/kaffeine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplummer%2Fkaffeine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplummer%2Fkaffeine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplummer%2Fkaffeine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplummer%2Fkaffeine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dplummer","download_url":"https://codeload.github.com/dplummer/kaffeine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplummer%2Fkaffeine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"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":["elixir","kafka"],"created_at":"2025-10-21T15:11:45.343Z","updated_at":"2026-02-18T22:02:02.282Z","avatar_url":"https://github.com/dplummer.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kaffeine\n\nA framework for consuming events from Kafka.\n\nThe docs can be found at https://hexdocs.pm/kaffeine\n\n## Installation\n\n1. Add Kaffeine to your deps.\n  ```\n  def deps do\n    [\n      {:kaffeine, \"~\u003e 0.1.0\"},\n    ]\n  end\n  ```\n2. Configure KafkaEx, KafkaImpl, and Kaffeine in your `config/config.exs`:\n  ```\n  config :kafka_ex,\n    # Set to your app name to configure the consumer_group\n    consumer_group: \"SET ME\",\n\n    # Configured at runtime by Kaffeine\n    brokers: [],\n\n    # Allow Kaffeine to setup workers at runtime\n    disable_default_worker: true,\n\n    # Timeout value, in msec, for synchronous operations (e.g., network calls)\n    sync_timeout: 4000,\n\n    # Configure to your version of kafka\n    kafka_version: \"0.8.2\",\n\n    # Using SSL on Kafka?\n    use_ssl: false\n\n  config :kafka_impl, :impl, KafkaImpl.KafkaEx\n\n  config :kaffeine,\n    consumer_wait_ms: {:system, \"KAFFEINE_CONSUMER_WAIT_MS\", 500},\n    catch_exceptions: {:system, \"KAFFEINE_CATCH_EXCEPTIONS\", true}\n  ```\n3. Create a KafkaSupervisor in your app with what topics you want to consume/produce: `lib/my_simple_app/kafka_supervisor.ex`:\n  ```\n  defmodule MySimpleApp.KafkaSupervisor do\n    def start_link(_opts) do\n      [\n        Kaffeine.consumer(\"MyTopic\", {MySimpleApp.KafkaConsumer, :my_hander, []}, []),\n        Kaffeine.producer(\"AnotherTopic\", encoder: \u0026Poison.encode/1)\n      ]\n      |\u003e Kaffeine.start()\n    end\n\n    @spec my_handler(Kaffeine.Event.t, Kaffeine.Consumer.t) :: :ok | {:error, String.t}\n    def my_handler(event, _consumer) do\n      IO.inspect event\n      :ok\n    end\n  end\n  ```\n4. Add the KafkaSupervisor to your supervision tree:\n  ```\n  supervisor(MySimpleApp.KafkaSupervisor, [])\n  ```\n5. To produce messages:\n  This is handled by the worker setup in the KafkaSupervisor, and encoded by the encoder\n  function listed there\n\n  ```\n  Kaffeine.produce(%{foo: 1, bar: 2}, \"AnotherTopic\")\n  ```\n\n## Contributing\n\nContributions are welcome! In particular, remember to:\n\n* Do not use the issues tracker for help or support requests (try Stack\n  Overflow, slack #kaffeine or mailing lists, etc).\n* For proposing a new feature, please start a discussion as an issue in the\n  issue tracker\n* For bugs, do a quick search in the issues tracker and make sure the bug has not yet been reported.\n* Finally, be nice and have fun! Remember all interactions in this project follow the same Code of Conduct as Elixir.\n\n## Running tests\n\n```\n$ git clone https://github.com/dplummer/kaffeine.git\n$ cd kaffeine\n$ mix deps.get\n$ mix test\n```\n\nBesides the unit tests above, it is recommended to run the kafka integration tests too:\n\n```\n# Run only Kafka integration tests\nmix test.kafka\n\n# Run all tests (unit and kafka integration)\nmix test.all\n```\n\n## License\n\n[MIT License](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdplummer%2Fkaffeine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdplummer%2Fkaffeine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdplummer%2Fkaffeine/lists"}