{"id":26658955,"url":"https://github.com/denisecase/kafka-api","last_synced_at":"2025-04-11T14:09:41.893Z","repository":{"id":35522383,"uuid":"217202432","full_name":"denisecase/kafka-api","owner":"denisecase","description":"Example Kafka Producer and Consumer apps.  ","archived":false,"fork":false,"pushed_at":"2024-03-14T13:13:32.000Z","size":122,"stargazers_count":1,"open_issues_count":5,"forks_count":54,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T10:17:17.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/denisecase.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":"2019-10-24T03:21:14.000Z","updated_at":"2022-01-29T20:06:34.000Z","dependencies_parsed_at":"2022-09-20T10:55:42.392Z","dependency_job_id":null,"html_url":"https://github.com/denisecase/kafka-api","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/denisecase%2Fkafka-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fkafka-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fkafka-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fkafka-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisecase","download_url":"https://codeload.github.com/denisecase/kafka-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248413732,"owners_count":21099351,"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-25T10:17:22.456Z","updated_at":"2025-04-11T14:09:41.869Z","avatar_url":"https://github.com/denisecase.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kafka-api\n\nExplore super-fast Apache Kafka.\n\n- [Quick Start](https://kafka.apache.org/quickstart). \n- [Tutorial](https://kafka.apache.org/31/documentation/streams/tutorial)\n\n## Recommended Tools\n\n* [VS Code](https://code.visualstudio.com/)\n* [VS Code Extension - Java Extension Pack](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)\n* [Context Menu: Add Open PowerShell Here as Administrator](https://www.tenforums.com/tutorials/60177-add-open-powershell-window-here-administrator-windows-10-a.html)\n\n## Prerequisities\n\n* OpenJDK or JDK (8 or up)\n\n-----\n\n## 1. Install Apache Kafka\n\n  - Go to Apache Kafka Downloads\n  - Download kafka_2.13-3.1.0.tgz (~84 MB)\n  - Extract it: Open Git Bash and run `tar -xzf kafka_2.13-3.1.0.tgz`\n  - Move the folder to C:\\\n\n## 2. Configure Apache Kafka\n\n* Configure Kafka (change 2 lines):\n  - In C:\\kafka_2.13-3.1.0/config/zookeeper.properties, set:\n  - `dataDir=C:/kafka_2.13-3.1.0/zookeeper-data`\n  - In C:\\kafka_2.13-3.1.0/config/server.properties, set:\n  - `log.dirs=C:/kafka_2.13-3.1.0/kafka-logs`\n\n-----\n  \n## 3. Start Zookeeper Service (PS Process 1 - keep open, minimize)\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\zookeeper-server-start.bat C:\\kafka_2.13-3.1.0\\config\\zookeeper.properties`\n\n## 4. Start Kafka Service (PS Process 2 - keep open, minimize)\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-server-start.bat C:\\kafka_2.13-3.1.0\\config\\server.properties`\n\n-----\n\n## 5. Create a Kakfa Topic (PS Process 3 - keep open, producer)\n\nCreate a Topic to Store Events:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-topics.bat --create --topic quickstart-events --bootstrap-server localhost:9092`\n\nWrite some events to the topic:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-producer.bat --topic quickstart-events --bootstrap-server localhost:9092`\n\n\n## 6. Read from a Kakfa Topic (PS Process 4 - keep open, consumer)\n\nRead the events:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-consumer.bat --topic quickstart-events --from-beginning --bootstrap-server localhost:9092`\n\n-----\n\n## Run Streams Example\n\nOpen PowerShell as Administrator in the root project folder, compile the code using Maven and create an executable jar file. Generated artifacts can be found in the new 'target' folder.\n\n```PowerShell\nmvn clean package\nmvn exec:java -D exec.mainClass=myapps.Pipe\n```\n\n## Create Topics and Rerun (Three New PS Process Windows)\n\nCreate input topic:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-topics.bat --create --topic streams-plaintext-input --bootstrap-server localhost:9092`\n\nWrite some events to the input topic:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-producer.bat --topic streams-plaintext-input --bootstrap-server localhost:9092`\n\nRead from pipe output topic:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-consumer.bat --topic streams-pipe-output --from-beginning --bootstrap-server localhost:9092`\n\nSend content to input topic:\n\n`type file-input.txt | C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-producer.bat --topic streams-plaintext-input --bootstrap-server localhost:9092`\n\nRead from wordcount output topic:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-consumer.bat --topic streams-wordcount-output --from-beginning --bootstrap-server localhost:9092`\n\nRead from linesplit output topic:\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-console-consumer.bat --topic streams-linesplit-output --from-beginning --bootstrap-server localhost:9092`\n\n## Explore\n\nGet information about the topic.\n\n`C:\\kafka_2.13-3.1.0\\bin\\windows\\kafka-topics.bat --topic quickstart-events --bootstrap-server localhost:9092 --describe`\n\n## Resources\n\n- \u003chttps://docs.confluent.io/4.1.1/streams/quickstart.html\u003e\n\n## Repository\n\n- Source: https://github.com/denisecase/kafka-api\n\n## Collaborators\n\n- Denise Case\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fkafka-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisecase%2Fkafka-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fkafka-api/lists"}