{"id":23106968,"url":"https://github.com/UrbanOS-Public/divo_kafka","last_synced_at":"2025-08-16T17:31:16.026Z","repository":{"id":48676341,"uuid":"178215427","full_name":"UrbanOS-Public/divo_kafka","owner":"UrbanOS-Public","description":"A pre-configured docker-compose stack for a Kafka cluster for integration testing with Divo","archived":false,"fork":false,"pushed_at":"2023-05-19T20:53:40.000Z","size":40,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-14T04:40:22.643Z","etag":null,"topics":["docker","elixir","kafka","testing-framework"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/divo_kafka","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/UrbanOS-Public.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}},"created_at":"2019-03-28T14:02:12.000Z","updated_at":"2023-05-17T14:31:38.000Z","dependencies_parsed_at":"2023-07-13T08:28:13.527Z","dependency_job_id":null,"html_url":"https://github.com/UrbanOS-Public/divo_kafka","commit_stats":null,"previous_names":["smartcitiesdata/divo_kafka"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanOS-Public%2Fdivo_kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanOS-Public%2Fdivo_kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanOS-Public%2Fdivo_kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanOS-Public%2Fdivo_kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UrbanOS-Public","download_url":"https://codeload.github.com/UrbanOS-Public/divo_kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230047254,"owners_count":18164573,"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":["docker","elixir","kafka","testing-framework"],"created_at":"2024-12-17T01:11:58.256Z","updated_at":"2024-12-17T01:11:59.200Z","avatar_url":"https://github.com/UrbanOS-Public.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Master](https://travis-ci.org/smartcitiesdata/divo_kafka.svg?branch=master)](https://travis-ci.org/smartcitiesdata/divo_kafka)\n[![Hex.pm Version](http://img.shields.io/hexpm/v/divo_kafka.svg?style=flat)](https://hex.pm/packages/divo_kafka)\n\n# Divo Kafka\n\nA library implementing the Divo Stack behaviour, providing a pre-configured Kafka\ncluster via docker-compose for integration testing Elixir apps. The cluster is a\nsingle-node kafka/zookeeper compose stack that can be configured with an arbitrary\nlist of topics to create on first start and the hostname/IP address the cluster\nexposes to outside hosts.\n\nRequires inclusion of the Divo library in your mix project.\n\n## Installation\n\nThe package can be installed by adding `divo` and `divo_kafka` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:divo, \"~\u003e 2.0.0\"},\n    {:divo_kafka, \"~\u003e 1.0.1\"}\n  ]\nend\n```\n\n## Use\n\nIn your Mix environment exs file (i.e. config/integration.exs), include the following:\n```elixir\nconfig :myapp,\n  divo: [\n    {DivoKafka, [create_topics: \"my-data:1:1\", outside_host: \"ci-host\"]}\n  ]\n```\n\nIn your integration test specify that you want to use Divo:\n```elixir\nuse Divo\n...\n```\n\nThe resulting stack will create a single-node Kafka and Zookeeper instance with\nZookeeper exposing port 2181 to the host and Kafka exposing port 9092 to the host.\n\n### Configuration\n\nYou may omit the configuration arguments to DivoKafka and still have a working stack.\n\n* `create_topics`: A string of the form `topic1-name:1:1,topic2-name:1:1` which will ensure\nthe list of topics are created at first start of the cluster. Defaults to `clusterready:1:1`\nto allow for readiness checking of the cluster.\n\n* `outside_host`: The hostname or IP address by which hosts external to the Kafka cluster can\nreach it (in this case, your app). Defaults to `localhost` but may cause problems when\nrunning in a CI system, particularly a containerized one. In such circumstances, it is\nrecommended to use an address or name that is routable even if ExUnit will be running inside\na container.\n\n* `auto_topic`: Whether or not topics will be created, if missing, when producing or consuming messages. Note that the topics supplied in `create_topics` will be created, on startup, regardless of this config setting. Defaults to `true`. \n\n* `kafka_image_version`: The kafka image ([wurstmeister/kafka](https://hub.docker.com/r/wurstmeister/kafka)) version to use. A list of available versions can be found on their [dockerhub tags page](https://hub.docker.com/r/wurstmeister/kafka/tags). Defaults to `false`\n\nSee [Divo GitHub](https://github.com/smartcitiesdata/divo) or [Divo Hex Documentation](https://hexdocs.pm/divo) for more instructions on using and configuring the Divo library.\nSee [wurstmeister/kafka](https://github.com/wurstmeister/kafka-docker) and\n[wurstmeister/zookeeper](https://github.com/wurstmeister/zookeeper-docker) for further documentation\non using and configuring the features of these images.\n\n\n## License\nReleased under [Apache 2 license](https://github.com/smartcitiesdata/divo_kafka/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUrbanOS-Public%2Fdivo_kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUrbanOS-Public%2Fdivo_kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUrbanOS-Public%2Fdivo_kafka/lists"}