{"id":15329531,"url":"https://github.com/tisonkun/kafka","last_synced_at":"2025-10-09T22:30:58.442Z","repository":{"id":183005547,"uuid":"669459417","full_name":"tisonkun/kafka","owner":"tisonkun","description":"Mirror of Apache Kafka","archived":false,"fork":true,"pushed_at":"2023-07-25T16:16:39.000Z","size":162631,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"trunk","last_synced_at":"2025-09-19T03:03:03.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"apache/kafka","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tisonkun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.html","support":null,"governance":null}},"created_at":"2023-07-22T10:52:07.000Z","updated_at":"2023-07-22T10:52:07.000Z","dependencies_parsed_at":"2023-07-22T12:02:20.616Z","dependency_job_id":null,"html_url":"https://github.com/tisonkun/kafka","commit_stats":null,"previous_names":["tisonkun/kafka"],"tags_count":100,"template":false,"template_full_name":null,"purl":"pkg:github/tisonkun/kafka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fkafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fkafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fkafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fkafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tisonkun","download_url":"https://codeload.github.com/tisonkun/kafka/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisonkun%2Fkafka/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002106,"owners_count":26083307,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-01T09:48:15.279Z","updated_at":"2025-10-09T22:30:55.766Z","avatar_url":"https://github.com/tisonkun.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Apache Kafka\n=================\nSee our [web site](https://kafka.apache.org) for details on the project.\n\nYou need to have [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) installed.\n\nWe build and test Apache Kafka with Java 8, 11, 17 and 20. We set the `release` parameter in javac and scalac\nto `8` to ensure the generated binaries are compatible with Java 8 or higher (independently of the Java version\nused for compilation). Java 8 support has been deprecated since Apache Kafka 3.0 and will be removed in Apache\nKafka 4.0 (see [KIP-750](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=181308223) for more details).\n\nScala 2.12 and 2.13 are supported and 2.13 is used by default. Scala 2.12 support has been deprecated since\nApache Kafka 3.0 and will be removed in Apache Kafka 4.0 (see [KIP-751](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=181308218)\nfor more details). See below for how to use a specific Scala version or all of the supported Scala versions.\n\n### Build a jar and run it ###\n    ./gradlew jar\n\nFollow instructions in https://kafka.apache.org/quickstart\n\n### Build source jar ###\n    ./gradlew srcJar\n\n### Build aggregated javadoc ###\n    ./gradlew aggregatedJavadoc\n\n### Build javadoc and scaladoc ###\n    ./gradlew javadoc\n    ./gradlew javadocJar # builds a javadoc jar for each module\n    ./gradlew scaladoc\n    ./gradlew scaladocJar # builds a scaladoc jar for each module\n    ./gradlew docsJar # builds both (if applicable) javadoc and scaladoc jars for each module\n\n### Run unit/integration tests ###\n    ./gradlew test # runs both unit and integration tests\n    ./gradlew unitTest\n    ./gradlew integrationTest\n    \n### Force re-running tests without code change ###\n    ./gradlew test --rerun\n    ./gradlew unitTest --rerun\n    ./gradlew integrationTest --rerun\n\n### Running a particular unit/integration test ###\n    ./gradlew clients:test --tests RequestResponseTest\n\n### Repeatedly running a particular unit/integration test ###\n    I=0; while ./gradlew clients:test --tests RequestResponseTest --rerun --fail-fast; do (( I=$I+1 )); echo \"Completed run: $I\"; sleep 1; done\n\n### Running a particular test method within a unit/integration test ###\n    ./gradlew core:test --tests kafka.api.ProducerFailureHandlingTest.testCannotSendToInternalTopic\n    ./gradlew clients:test --tests org.apache.kafka.clients.MetadataTest.testTimeToNextUpdate\n\n### Running a particular unit/integration test with log4j output ###\nChange the log4j setting in either `clients/src/test/resources/log4j.properties` or `core/src/test/resources/log4j.properties`\n\n    ./gradlew clients:test --tests RequestResponseTest\n\n### Specifying test retries ###\nBy default, each failed test is retried once up to a maximum of five retries per test run. Tests are retried at the end of the test task. Adjust these parameters in the following way:\n\n    ./gradlew test -PmaxTestRetries=1 -PmaxTestRetryFailures=5\n    \nSee [Test Retry Gradle Plugin](https://github.com/gradle/test-retry-gradle-plugin) for more details.\n\n### Generating test coverage reports ###\nGenerate coverage reports for the whole project:\n\n    ./gradlew reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false\n\nGenerate coverage for a single module, i.e.: \n\n    ./gradlew clients:reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false\n    \n### Building a binary release gzipped tar ball ###\n    ./gradlew clean releaseTarGz\n\nThe release file can be found inside `./core/build/distributions/`.\n\n### Building auto generated messages ###\nSometimes it is only necessary to rebuild the RPC auto-generated message data when switching between branches, as they could\nfail due to code changes. You can just run:\n \n    ./gradlew processMessages processTestMessages\n\n### Running a Kafka broker in KRaft mode\n\n    KAFKA_CLUSTER_ID=\"$(./bin/kafka-storage.sh random-uuid)\"\n    ./bin/kafka-storage.sh format -t $KAFKA_CLUSTER_ID -c config/kraft/server.properties\n    ./bin/kafka-server-start.sh config/kraft/server.properties\n\n### Running a Kafka broker in ZooKeeper mode\n\n    ./bin/zookeeper-server-start.sh config/zookeeper.properties\n    ./bin/kafka-server-start.sh config/server.properties\n\n### Cleaning the build ###\n    ./gradlew clean\n\n### Running a task with one of the Scala versions available (2.12.x or 2.13.x) ###\n*Note that if building the jars with a version other than 2.13.x, you need to set the `SCALA_VERSION` variable or change it in `bin/kafka-run-class.sh` to run the quick start.*\n\nYou can pass either the major version (eg 2.12) or the full version (eg 2.12.7):\n\n    ./gradlew -PscalaVersion=2.12 jar\n    ./gradlew -PscalaVersion=2.12 test\n    ./gradlew -PscalaVersion=2.12 releaseTarGz\n\n### Running a task with all the scala versions enabled by default ###\n\nInvoke the `gradlewAll` script followed by the task(s):\n\n    ./gradlewAll test\n    ./gradlewAll jar\n    ./gradlewAll releaseTarGz\n\n### Running a task for a specific project ###\nThis is for `core`, `examples` and `clients`\n\n    ./gradlew core:jar\n    ./gradlew core:test\n\nStreams has multiple sub-projects, but you can run all the tests:\n\n    ./gradlew :streams:testAll\n\n### Listing all gradle tasks ###\n    ./gradlew tasks\n\n### Building IDE project ####\n*Note that this is not strictly necessary (IntelliJ IDEA has good built-in support for Gradle projects, for example).*\n\n    ./gradlew eclipse\n    ./gradlew idea\n\nThe `eclipse` task has been configured to use `${project_dir}/build_eclipse` as Eclipse's build directory. Eclipse's default\nbuild directory (`${project_dir}/bin`) clashes with Kafka's scripts directory and we don't use Gradle's build directory\nto avoid known issues with this configuration.\n\n### Publishing the jar for all versions of Scala and for all projects to maven ###\nThe recommended command is:\n\n    ./gradlewAll publish\n\nFor backwards compatibility, the following also works:\n\n    ./gradlewAll uploadArchives\n\nPlease note for this to work you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`) and assign the following variables\n\n    mavenUrl=\n    mavenUsername=\n    mavenPassword=\n    signing.keyId=\n    signing.password=\n    signing.secretKeyRingFile=\n\n### Publishing the streams quickstart archetype artifact to maven ###\nFor the Streams archetype project, one cannot use gradle to upload to maven; instead the `mvn deploy` command needs to be called at the quickstart folder:\n\n    cd streams/quickstart\n    mvn deploy\n\nPlease note for this to work you should create/update user maven settings (typically, `${USER_HOME}/.m2/settings.xml`) to assign the following variables\n\n    \u003csettings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\"\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n       xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0\n                           https://maven.apache.org/xsd/settings-1.0.0.xsd\"\u003e\n    ...                           \n    \u003cservers\u003e\n       ...\n       \u003cserver\u003e\n          \u003cid\u003eapache.snapshots.https\u003c/id\u003e\n          \u003cusername\u003e${maven_username}\u003c/username\u003e\n          \u003cpassword\u003e${maven_password}\u003c/password\u003e\n       \u003c/server\u003e\n       \u003cserver\u003e\n          \u003cid\u003eapache.releases.https\u003c/id\u003e\n          \u003cusername\u003e${maven_username}\u003c/username\u003e\n          \u003cpassword\u003e${maven_password}\u003c/password\u003e\n        \u003c/server\u003e\n        ...\n     \u003c/servers\u003e\n     ...\n\n\n### Installing ALL the jars to the local Maven repository ###\nThe recommended command to build for both Scala 2.12 and 2.13 is:\n\n    ./gradlewAll publishToMavenLocal\n\nFor backwards compatibility, the following also works:\n\n    ./gradlewAll install\n\n### Installing specific projects to the local Maven repository ###\n\n    ./gradlew -PskipSigning=true :streams:publishToMavenLocal\n    \nIf needed, you can specify the Scala version with `-PscalaVersion=2.13`.\n\n### Building the test jar ###\n    ./gradlew testJar\n\n### Running code quality checks ###\nThere are two code quality analysis tools that we regularly run, spotbugs and checkstyle.\n\n#### Checkstyle ####\nCheckstyle enforces a consistent coding style in Kafka.\nYou can run checkstyle using:\n\n    ./gradlew checkstyleMain checkstyleTest\n\nThe checkstyle warnings will be found in `reports/checkstyle/reports/main.html` and `reports/checkstyle/reports/test.html` files in the\nsubproject build directories. They are also printed to the console. The build will fail if Checkstyle fails.\n\n#### Spotbugs ####\nSpotbugs uses static analysis to look for bugs in the code.\nYou can run spotbugs using:\n\n    ./gradlew spotbugsMain spotbugsTest -x test\n\nThe spotbugs warnings will be found in `reports/spotbugs/main.html` and `reports/spotbugs/test.html` files in the subproject build\ndirectories.  Use -PxmlSpotBugsReport=true to generate an XML report instead of an HTML one.\n\n### JMH microbenchmarks ###\nWe use [JMH](https://openjdk.java.net/projects/code-tools/jmh/) to write microbenchmarks that produce reliable results in the JVM.\n    \nSee [jmh-benchmarks/README.md](https://github.com/apache/kafka/blob/trunk/jmh-benchmarks/README.md) for details on how to run the microbenchmarks.\n\n### Dependency Analysis ###\n\nThe gradle [dependency debugging documentation](https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html) mentions using the `dependencies` or `dependencyInsight` tasks to debug dependencies for the root project or individual subprojects.\n\nAlternatively, use the `allDeps` or `allDepInsight` tasks for recursively iterating through all subprojects:\n\n    ./gradlew allDeps\n\n    ./gradlew allDepInsight --configuration runtimeClasspath --dependency com.fasterxml.jackson.core:jackson-databind\n\nThese take the same arguments as the builtin variants.\n\n### Determining if any dependencies could be updated ###\n    ./gradlew dependencyUpdates\n\n### Common build options ###\n\nThe following options should be set with a `-P` switch, for example `./gradlew -PmaxParallelForks=1 test`.\n\n* `commitId`: sets the build commit ID as .git/HEAD might not be correct if there are local commits added for build purposes.\n* `mavenUrl`: sets the URL of the maven deployment repository (`file://path/to/repo` can be used to point to a local repository).\n* `maxParallelForks`: maximum number of test processes to start in parallel. Defaults to the number of processors available to the JVM.\n* `maxScalacThreads`: maximum number of worker threads for the scalac backend. Defaults to the lowest of `8` and the number of processors\navailable to the JVM. The value must be between 1 and 16 (inclusive). \n* `ignoreFailures`: ignore test failures from junit\n* `showStandardStreams`: shows standard out and standard error of the test JVM(s) on the console.\n* `skipSigning`: skips signing of artifacts.\n* `testLoggingEvents`: unit test events to be logged, separated by comma. For example `./gradlew -PtestLoggingEvents=started,passed,skipped,failed test`.\n* `xmlSpotBugsReport`: enable XML reports for spotBugs. This also disables HTML reports as only one can be enabled at a time.\n* `maxTestRetries`: maximum number of retries for a failing test case.\n* `maxTestRetryFailures`: maximum number of test failures before retrying is disabled for subsequent tests.\n* `enableTestCoverage`: enables test coverage plugins and tasks, including bytecode enhancement of classes required to track said\ncoverage. Note that this introduces some overhead when running tests and hence why it's disabled by default (the overhead\nvaries, but 15-20% is a reasonable estimate).\n* `keepAliveMode`: configures the keep alive mode for the Gradle compilation daemon - reuse improves start-up time. The values should \nbe one of `daemon` or `session` (the default is `daemon`). `daemon` keeps the daemon alive until it's explicitly stopped while\n`session` keeps it alive until the end of the build session. This currently only affects the Scala compiler, see\nhttps://github.com/gradle/gradle/pull/21034 for a PR that attempts to do the same for the Java compiler.\n* `scalaOptimizerMode`: configures the optimizing behavior of the scala compiler, the value should be one of `none`, `method`, `inline-kafka` or\n`inline-scala` (the default is `inline-kafka`). `none` is the scala compiler default, which only eliminates unreachable code. `method` also\nincludes method-local optimizations. `inline-kafka` adds inlining of methods within the kafka packages. Finally, `inline-scala` also\nincludes inlining of methods within the scala library (which avoids lambda allocations for methods like `Option.exists`). `inline-scala` is\nonly safe if the Scala library version is the same at compile time and runtime. Since we cannot guarantee this for all cases (for example, users\nmay depend on the kafka jar for integration tests where they may include a scala library with a different version), we don't enable it by\ndefault. See https://www.lightbend.com/blog/scala-inliner-optimizer for more details.\n\n### Running system tests ###\n\nSee [tests/README.md](tests/README.md).\n\n### Running in Vagrant ###\n\nSee [vagrant/README.md](vagrant/README.md).\n\n### Contribution ###\n\nApache Kafka is interested in building the community; we would welcome any thoughts or [patches](https://issues.apache.org/jira/browse/KAFKA). You can reach us [on the Apache mailing lists](http://kafka.apache.org/contact.html).\n\nTo contribute follow the instructions here:\n * https://kafka.apache.org/contributing.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftisonkun%2Fkafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftisonkun%2Fkafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftisonkun%2Fkafka/lists"}