[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1961":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},1961,"kafka","apache\u002Fkafka","apache","Apache Kafka - A distributed event streaming platform","https:\u002F\u002Fkafka.apache.org\u002F",null,"Java",32785,15268,1042,351,0,13,75,250,71,120,"Apache License 2.0",false,"trunk",[26,5,27,28],"java","scala","streaming","2026-06-12 04:00:12","\u003Cp align=\"center\">\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"docs\u002Fimages\u002Fkafka-logo-readme-light.svg\">\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs\u002Fimages\u002Fkafka-logo-readme-dark.svg\">\n  \u003Cimg src=\"docs\u002Fimages\u002Fkafka-logo-readme-light.svg\" alt=\"Kafka Logo\" width=\"50%\"> \n\u003C\u002Fpicture>\n\u003C\u002Fp>\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fapache\u002Fkafka\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg?branch=trunk&event=push)](https:\u002F\u002Fgithub.com\u002Fapache\u002Fkafka\u002Factions\u002Fworkflows\u002Fci.yml?query=event%3Apush+branch%3Atrunk)\n[![Flaky Test Report](https:\u002F\u002Fgithub.com\u002Fapache\u002Fkafka\u002Factions\u002Fworkflows\u002Fgenerate-reports.yml\u002Fbadge.svg?branch=trunk&event=schedule)](https:\u002F\u002Fgithub.com\u002Fapache\u002Fkafka\u002Factions\u002Fworkflows\u002Fgenerate-reports.yml?query=event%3Aschedule+branch%3Atrunk)\n\n[**Apache Kafka**](https:\u002F\u002Fkafka.apache.org) is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.\n\nYou need to have [Java](http:\u002F\u002Fwww.oracle.com\u002Ftechnetwork\u002Fjava\u002Fjavase\u002Fdownloads\u002Findex.html) installed.\n\nWe build and test Apache Kafka with Java versions 17 and 25. The `release` parameter in javac is set to `11` for the clients \nand streams modules, and `17` for the rest, ensuring compatibility with their respective\nminimum Java versions. Similarly, the `release` parameter in scalac is set to `11` for the streams modules and `17`\nfor the rest.\n\nScala 2.13 is the only supported version in Apache Kafka.\n\n### Build a JAR and run it\n```bash\n.\u002Fgradlew jar\n```\n\nFollow instructions in https:\u002F\u002Fkafka.apache.org\u002Fquickstart\n\n### Build source JAR\n```bash\n.\u002Fgradlew srcJar\n```\n\n### Build aggregated javadoc\n```bash\n.\u002Fgradlew aggregatedJavadoc --no-parallel\n```\n\n### Build javadoc and scaladoc\n```bash\n.\u002Fgradlew javadoc\n.\u002Fgradlew javadocJar # builds a javadoc jar for each module\n.\u002Fgradlew scaladoc\n.\u002Fgradlew scaladocJar # builds a scaladoc jar for each module\n.\u002Fgradlew docsJar # builds both (if applicable) javadoc and scaladoc jars for each module\n```\n\n### Run unit\u002Fintegration tests\n```bash\n.\u002Fgradlew test  # runs both unit and integration tests\n.\u002Fgradlew unitTest\n.\u002Fgradlew integrationTest\n.\u002Fgradlew test -Pkafka.test.run.flaky=true  # runs tests that are marked as flaky\n```\n\n### Force re-running tests without code change\n```bash\n.\u002Fgradlew test --rerun-tasks\n.\u002Fgradlew unitTest --rerun-tasks\n.\u002Fgradlew integrationTest --rerun-tasks\n```\n\n### Running a particular unit\u002Fintegration test\n```bash\n.\u002Fgradlew clients:test --tests RequestResponseTest\n.\u002Fgradlew streams:integration-tests:test --tests RestoreIntegrationTest\n```\n\n### Running a particular unit\u002Fintegration test N times\n```bash\nN=500; I=0; while [ $I -lt $N ] && .\u002Fgradlew clients:test --tests RequestResponseTest --rerun --fail-fast; do (( I=$I+1 )); echo \"Completed run: $I\"; sleep 1; done\n```\n\n### Running a particular test method within a unit\u002Fintegration test\n```bash\n.\u002Fgradlew core:test --tests kafka.api.ProducerFailureHandlingTest.testCannotSendToInternalTopic\n.\u002Fgradlew clients:test --tests org.apache.kafka.clients.MetadataTest.testTimeToNextUpdate\n.\u002Fgradlew streams:integration-tests:test --tests org.apache.kafka.streams.integration.RestoreIntegrationTest.shouldRestoreNullRecord\n```\n\n### Running a particular unit\u002Fintegration test with log4j output\nBy default, there will be only a small number of logs output while testing. You can adjust it by changing the `log4j2.yaml` file in the module's `src\u002Ftest\u002Fresources` directory.\n\nFor example, if you want to see more logs for clients project tests, you can modify [the line](https:\u002F\u002Fgithub.com\u002Fapache\u002Fkafka\u002Fblob\u002Ftrunk\u002Fclients\u002Fsrc\u002Ftest\u002Fresources\u002Flog4j2.yaml#L35) in `clients\u002Fsrc\u002Ftest\u002Fresources\u002Flog4j2.yaml` \nto `level: INFO` and then run:\n\n```bash\n.\u002Fgradlew cleanTest clients:test --tests NetworkClientTest\n```\n\nAnd you should see `INFO` level logs in the file under the `clients\u002Fbuild\u002Ftest-results\u002Ftest` directory.\n\n### Specifying test retries\nRetries are disabled by default, but you can set maxTestRetryFailures and maxTestRetries to enable retries.\n\nThe following example declares -PmaxTestRetries=1 and -PmaxTestRetryFailures=3 to enable a failed test to be retried once, with a total retry limit of 3.\n\n```bash\n.\u002Fgradlew test -PmaxTestRetries=1 -PmaxTestRetryFailures=3\n```\n\nSee [Test Retry Gradle Plugin](https:\u002F\u002Fgithub.com\u002Fgradle\u002Ftest-retry-gradle-plugin) and [build.yml](.github\u002Fworkflows\u002Fbuild.yml) for more details.\n\n### Generating test coverage reports\nGenerate coverage reports for the whole project:\n\n```bash\n.\u002Fgradlew reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false\n```\n\nGenerate coverage for a single module, i.e.: \n\n```bash\n.\u002Fgradlew clients:reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false\n```\n\nCoverage reports are located within the module's build directory, categorized by module type:\n\nCore Module (:core): `core\u002Fbuild\u002Freports\u002FscoverageTest\u002Findex.html`\n\nOther Modules: `\u003Cmodule>\u002Fbuild\u002Freports\u002Fjacoco\u002Ftest\u002Fhtml\u002Findex.html`\n\n### Building a binary release gzipped tarball\n```bash\n.\u002Fgradlew clean releaseTarGz\n```\n\nThe release file can be found inside `.\u002Fcore\u002Fbuild\u002Fdistributions\u002F`.\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```bash\n.\u002Fgradlew processMessages processTestMessages\n```\n\nSee [Apache Kafka Message Definitions](clients\u002Fsrc\u002Fmain\u002Fresources\u002Fcommon\u002Fmessage\u002FREADME.md) for details on Apache Kafka message protocol.\n\n### Running a Kafka broker\n\nUsing compiled files:\n\n```bash\nKAFKA_CLUSTER_ID=\"$(.\u002Fbin\u002Fkafka-storage.sh random-uuid)\"\n.\u002Fbin\u002Fkafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config\u002Fserver.properties\n.\u002Fbin\u002Fkafka-server-start.sh config\u002Fserver.properties\n```\n\nUsing docker image:\n\n```bash\ndocker run -p 9092:9092 apache\u002Fkafka:latest\n```\n\nSee [docker\u002FREADME.md](docker\u002FREADME.md) for detailed information.\n\n### Cleaning the build\n```bash\n.\u002Fgradlew clean\n```\n\n### Running a task for a specific project\nThis is for `core`, `examples` and `clients`\n\n```bash\n.\u002Fgradlew core:jar\n.\u002Fgradlew core:test\n```\n\nStreams has multiple sub-projects, but you can run all the tests:\n\n```bash\n.\u002Fgradlew :streams:testAll\n```\n\n### Listing all gradle tasks\n```bash\n.\u002Fgradlew tasks\n```\n\n### Building IDE project\n*Note: Please ensure that JDK 17 is used when developing Kafka.*\n\nIntelliJ supports Gradle natively, and it will automatically check Java syntax and compatibility for each module, even if\nthe Java version shown in the `Structure > Project Settings > Modules` may not be the correct one.\n\nWhen it comes to Eclipse, run:\n\n```bash\n.\u002Fgradlew eclipse\n```\n\nThe `eclipse` task has been configured to use `${project_dir}\u002Fbuild_eclipse` as Eclipse's build directory. Eclipse's default\nbuild directory (`${project_dir}\u002Fbin`) 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 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```bash\ncd streams\u002Fquickstart\nmvn deploy\n```\n\nPlease note for this to work you should create\u002Fupdate user maven settings (typically, `${USER_HOME}\u002F.m2\u002Fsettings.xml`) to assign the following variables\n\n    \u003Csettings xmlns=\"http:\u002F\u002Fmaven.apache.org\u002FSETTINGS\u002F1.0.0\"\n       xmlns:xsi=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema-instance\"\n       xsi:schemaLocation=\"http:\u002F\u002Fmaven.apache.org\u002FSETTINGS\u002F1.0.0\n                           https:\u002F\u002Fmaven.apache.org\u002Fxsd\u002Fsettings-1.0.0.xsd\">\n    ...                           \n    \u003Cservers>\n       ...\n       \u003Cserver>\n          \u003Cid>apache.snapshots.https\u003C\u002Fid>\n          \u003Cusername>${maven_username}\u003C\u002Fusername>\n          \u003Cpassword>${maven_password}\u003C\u002Fpassword>\n       \u003C\u002Fserver>\n       \u003Cserver>\n          \u003Cid>apache.releases.https\u003C\u002Fid>\n          \u003Cusername>${maven_username}\u003C\u002Fusername>\n          \u003Cpassword>${maven_password}\u003C\u002Fpassword>\n        \u003C\u002Fserver>\n        ...\n     \u003C\u002Fservers>\n     ...\n\n### Installing all projects to the local Maven repository\n\n```bash\n.\u002Fgradlew -PskipSigning=true publishToMavenLocal\n```\n\n### Installing specific projects to the local Maven repository\n\n```bash\n.\u002Fgradlew -PskipSigning=true :streams:publishToMavenLocal\n```\n\n### Building the test JAR\n```bash\n.\u002Fgradlew testJar\n```\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```bash\n.\u002Fgradlew checkstyleMain checkstyleTest spotlessCheck\n```\n\nThe Checkstyle warnings will be found in `reports\u002Fcheckstyle\u002Freports\u002Fmain.html` and `reports\u002Fcheckstyle\u002Freports\u002Ftest.html` files in the\nsubproject build directories. They are also printed to the console. The build will fail if Checkstyle fails.\nFor experiments (or regression testing purposes) add `-PcheckstyleVersion=X.y.z` switch (to override project-defined checkstyle version).\n\n#### Spotless\nThe import order is a part of static check. Please call `spotlessApply` to optimize Java imports before filing a pull request.\n\n```bash\n.\u002Fgradlew spotlessApply\n```\n\n#### SpotBugs\nSpotBugs uses static analysis to look for bugs in the code.\nYou can run SpotBugs using:\n\n```bash\n.\u002Fgradlew spotbugsMain spotbugsTest -x test\n```\n\nThe SpotBugs warnings will be found in `reports\u002Fspotbugs\u002Fmain.html` and `reports\u002Fspotbugs\u002Ftest.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:\u002F\u002Fopenjdk.java.net\u002Fprojects\u002Fcode-tools\u002Fjmh\u002F) to write microbenchmarks that produce reliable results in the JVM.\n\nSee [jmh-benchmarks\u002FREADME.md](https:\u002F\u002Fgithub.com\u002Fapache\u002Fkafka\u002Fblob\u002Ftrunk\u002Fjmh-benchmarks\u002FREADME.md) for details on how to run the microbenchmarks.\n\n### Dependency Analysis\n\nThe gradle [dependency debugging documentation](https:\u002F\u002Fdocs.gradle.org\u002Fcurrent\u002Fuserguide\u002Fviewing_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```bash\n.\u002Fgradlew allDeps\n\n.\u002Fgradlew allDepInsight --configuration runtimeClasspath --dependency com.fasterxml.jackson.core:jackson-databind\n```\n\nThese take the same arguments as the built-in variants.\n\n### Determining if any dependencies could be updated\n```bash\n.\u002Fgradlew dependencyUpdates --no-parallel\n```\n\n### Common build options ###\n\nThe following options should be set with a `-P` switch, for example `.\u002Fgradlew -PmaxParallelForks=1 test`.\n\n* `commitId`: sets the build commit ID as .git\u002FHEAD might not be correct if there are local commits added for build purposes.\n* `mavenUrl`: sets the URL of the maven deployment repository (`file:\u002F\u002Fpath\u002Fto\u002Frepo` 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 output 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 `.\u002Fgradlew -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:\u002F\u002Fgithub.com\u002Fgradle\u002Fgradle\u002Fpull\u002F21034 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:\u002F\u002Fwww.lightbend.com\u002Fblog\u002Fscala-inliner-optimizer for more details.\n\n### Upgrading Gradle version\n\nSee [gradle\u002Fwrapper\u002FREADME.md](gradle\u002Fwrapper\u002FREADME.md) for instructions on upgrading the Gradle version.\n\n### Running system tests\n\nSee [tests\u002FREADME.md](tests\u002FREADME.md).\n\n### Using Trogdor for testing\n\nWe use Trogdor as a test framework for Apache Kafka. You can use it to run benchmarks and other workloads.\n\nSee [trogdor\u002FREADME.md](trogdor\u002FREADME.md).\n\n### Running in Vagrant\n\nSee [vagrant\u002FREADME.md](vagrant\u002FREADME.md).\n\n### Kafka client examples\n\nSee [examples\u002FREADME.md](examples\u002FREADME.md).\n\n### Contribution\n\nApache Kafka is interested in building the community; we would welcome any thoughts or [patches](https:\u002F\u002Fissues.apache.org\u002Fjira\u002Fbrowse\u002FKAFKA). You can reach us [on the Apache mailing lists](http:\u002F\u002Fkafka.apache.org\u002Fcontact.html).\n\nTo contribute follow the instructions here:\n * https:\u002F\u002Fkafka.apache.org\u002Fcontributing.html\n","Apache Kafka 是一个开源的分布式事件流处理平台，广泛应用于高性能数据管道、流式分析、数据集成以及关键任务应用中。它使用Java和Scala编写，支持高吞吐量、低延迟的消息传递，并具备强大的容错能力和可扩展性。Kafka 通过发布\u002F订阅模式实现了消息的实时传输，同时支持流处理功能，能够满足大规模数据处理的需求。适用于需要处理大量实时数据流的企业级应用场景，如日志聚合、指标收集与监控、事件驱动架构等。",2,"2026-06-11 02:47:03","top_all"]