{"id":22442116,"url":"https://github.com/colinbut/kafka-java-example","last_synced_at":"2025-03-27T10:16:40.491Z","repository":{"id":69158277,"uuid":"146132971","full_name":"colinbut/kafka-java-example","owner":"colinbut","description":"Kafka example using Java","archived":false,"fork":false,"pushed_at":"2018-12-05T15:20:17.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T14:46:16.387Z","etag":null,"topics":["java","java-8","kafka","kafka-topic"],"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/colinbut.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":"2018-08-25T22:10:12.000Z","updated_at":"2018-12-05T15:20:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"f38ab452-57e0-4244-a27e-49b7be592777","html_url":"https://github.com/colinbut/kafka-java-example","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/colinbut%2Fkafka-java-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fkafka-java-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fkafka-java-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinbut%2Fkafka-java-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colinbut","download_url":"https://codeload.github.com/colinbut/kafka-java-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245823318,"owners_count":20678173,"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":["java","java-8","kafka","kafka-topic"],"created_at":"2024-12-06T02:18:10.798Z","updated_at":"2025-03-27T10:16:40.486Z","avatar_url":"https://github.com/colinbut.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kafka Java Example\n\nThis repository showcase using Kafka with vanilla Java.\n\n### Start Kafka \u0026 Create the Topics\n\nFollow the example commands in the `kafka-cli-commands.txt` which can be found under the `src/main/resources` folder.\n\n### One Producer - One Consumer Group with Multiple Consumer Instances\n\nUnder this example, we should expect each individual consumer instances within the One Consumer Group to pick up messages from the\nKafka topic. The messages would be shared between the different consumer instances. This allows load balancing of Consumer messages.\n\n1) Run the `ProducerApp.java`\n\n....\n\nEnsure `KafkaConfig.java` has same GROUP_ID_CONFIG for all Kafka Consumer instances - change if needed\n\n2) Run as many `ConsumerApp.java` as needed\n\nWhen running say 5 partitions, you should expect the 5 partitions to be shared amongst the Kafka consumer instances.\n\n\n\n### One Producer - Multiple Consumer Group each with One Consumer Instance\n\nUnder this example, we should expect the same message to be delivered to each Consumer Group. Effectively this enables a\nmore publisher-subscriber communication model because the messages are being broadcast to each Consumer Groups. Each consumer group\nis particularly an individual separate consumer of the Topic.\n\nThe consumer instances within the Consumer Groups still follow the same rules as above example such that the message will be\nload balanced amongst the individual consumer instances.\n\n1) Run the `ProducerApp.java`\n\n....\n\nChange `KafkaConfig.java` to have a different (unique) GROUP_ID_CONFIG for all Kafka Consumer instances\n\n2) Run as many `ConsumerApp.java` as needed\n\nRegardless of the number of partitions, you should expect all the messages to be broadcast to all participating\nConsumer Groups.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinbut%2Fkafka-java-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolinbut%2Fkafka-java-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinbut%2Fkafka-java-example/lists"}