{"id":20173270,"url":"https://github.com/teedjay/playground-kafka","last_synced_at":"2026-06-04T22:31:04.362Z","repository":{"id":73156867,"uuid":"105535325","full_name":"teedjay/playground-kafka","owner":"teedjay","description":"Testing Kafka 0.11 consumer api and streaming api","archived":false,"fork":false,"pushed_at":"2019-01-22T11:33:56.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T15:53:20.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/teedjay.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-02T13:08:00.000Z","updated_at":"2019-01-22T11:33:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"7adf4151-aff3-4fdb-8803-b817bb37572f","html_url":"https://github.com/teedjay/playground-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teedjay%2Fplayground-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teedjay","download_url":"https://codeload.github.com/teedjay/playground-kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241610978,"owners_count":19990505,"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-11-14T01:34:36.290Z","updated_at":"2026-06-04T22:31:04.343Z","avatar_url":"https://github.com/teedjay.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# playground-kafka\nSmall tests for Kafka 2.1 consumer api and streaming api, \nshowing how to send, pull and stream messages using Java 8.\n\nKafka 0.11 has some nice new features like exactly-once semantics\nand atomic writes using the new transaction API.  Read more about\nthese feature in this excellent article \n[Exactly-once Semantics are Possible: Here’s How Kafka Does it](https://www.confluent.io/blog/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it/).\n\n## Prerequisite \nIn order to run these small examples you need a running Kafka broker on \nlocalhost port 9092 with a topic called ```test-topic```.\n\n## Quickstart Kafka broker\nStart a Kafka broker locally by using [Blacktop Kafka Docker image](https://hub.docker.com/r/blacktop/kafka/).\n\n```\ndocker run -d \\\n           --name kafka \\\n           -p 9092:9092 \\\n           -e KAFKA_ADVERTISED_HOST_NAME=localhost \\\n           -e KAFKA_CREATE_TOPICS=\"test-topic:1:1,topic-a:1:1,topic-b:1:1\" \\\n           blacktop/kafka\n```\n\nTo run the same on a server change the host name to reflect :\n```\ndocker run -d \\\n           --name kafka \\\n           -p 9092:9092 \\\n           -e KAFKA_ADVERTISED_HOST_NAME=er-ts-appqa04.os.eon.no \\\n           -e KAFKA_CREATE_TOPICS=\"test-topic:1:1\" \\\n           blacktop/kafka\n```\n           \nMore info about Kafka can be found in the [Kafka Documentation](https://kafka.apache.org/documentation/)\n\nWhen the Docker container has started you can start and stop as needed. \n\n```\ndocker stop kafka\ndocker start kafka\n\ndocker ps -a (lists all docker containers, even those not running)\n```\n\n## Running the demos\nThere are two consumer examples, they connect to the broker using different group.id / application.id\nso they will both receive all messages and they can be run in parallel.\n\n- [ ] AdminClientTest, connects to broker and list topics and cluster info\n- [ ] TestConsumer, connects to broker and pulls messages\n- [ ] TestProducer, connects to broker and send x messages of y size\n- [ ] StreamConsumer, connects to broker and streams messages\n\n\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteedjay%2Fplayground-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteedjay%2Fplayground-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteedjay%2Fplayground-kafka/lists"}