{"id":13439188,"url":"https://github.com/kafka-rust/kafka-rust","last_synced_at":"2025-05-13T18:08:57.471Z","repository":{"id":31668196,"uuid":"35233654","full_name":"kafka-rust/kafka-rust","owner":"kafka-rust","description":"Rust client for Apache Kafka","archived":false,"fork":false,"pushed_at":"2025-02-02T15:21:26.000Z","size":1156,"stargazers_count":1321,"open_issues_count":52,"forks_count":136,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-28T00:09:30.785Z","etag":null,"topics":["kafka","kafka-rust","rust","rust-client"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kafka-rust.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2015-05-07T17:26:40.000Z","updated_at":"2025-04-26T03:09:38.000Z","dependencies_parsed_at":"2024-06-18T18:21:38.439Z","dependency_job_id":"709a50de-f669-4427-bfc5-712ddb5fbd15","html_url":"https://github.com/kafka-rust/kafka-rust","commit_stats":{"total_commits":474,"total_committers":24,"mean_commits":19.75,"dds":0.4514767932489452,"last_synced_commit":"af3b3461a193c28bd3af52c46601c5b721801f5b"},"previous_names":["spicavigo/kafka-rust"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kafka-rust%2Fkafka-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kafka-rust%2Fkafka-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kafka-rust%2Fkafka-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kafka-rust%2Fkafka-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kafka-rust","download_url":"https://codeload.github.com/kafka-rust/kafka-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000850,"owners_count":21997441,"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":["kafka","kafka-rust","rust","rust-client"],"created_at":"2024-07-31T03:01:11.832Z","updated_at":"2025-05-13T18:08:57.446Z","avatar_url":"https://github.com/kafka-rust.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","虚拟化","Clients"],"sub_categories":["Distributed systems","分布式系统 Distributed systems","分布式系统","Rust"],"readme":"# Kafka Rust Client\n\n## Project Status\n\nThis project is starting to be maintained by John Ward, the current status is that I am bringing the project up to date with the latest dependencies, removing deprecated Rust code and adjusting the tests.\n\n## New Home\n\nWelcome to kafka-rust's new home: https://github.com/kafka-rust\n\n## Documentation\n\n- This library is primarily documented through examples in its [API documentation](https://docs.rs/kafka/).\n- Documentation about Kafka itself can be found at [its project home page](http://kafka.apache.org/).\n\n## Installation\n\nThis crate works with Cargo and is on\n[crates.io](https://crates.io/crates/kafka). The API is currently\nunder heavy movement although we do follow semantic versioning (but\nexpect the version number to grow quickly).\n\n```toml\n[dependencies]\nkafka = \"0.10\"\n```\n\nTo build kafka-rust the usual `cargo build` should suffice. The crate\nsupports various features which can be turned off at compile time.\nSee kafka-rust's `Cargo.toml` and [cargo's documentation](http://doc.crates.io/manifest.html#the-features-section).\n\n## Supported Kafka version\n\n`kafka-rust` is tested for compatibility with a select few Kafka versions from 0.8.2 to 3.1.0. However,\nnot all features from Kafka 0.9 and newer are supported yet.\n\n## Examples\n\nAs mentioned, the [cargo generated documentation](https://docs.rs/kafka/) contains some examples.\nFurther, standalone, compilable example programs are provided in the\n[examples directory of the repository](https://github.com/spicavigo/kafka-rust/tree/master/examples).\n\n## Consumer\n\nThis is a higher-level consumer API for Kafka and is provided by the\nmodule `kafka::consumer`. It provides convenient offset management\nsupport on behalf of a specified group. This is the API a client\napplication of this library wants to use for receiving messages from\nKafka.\n\n## Producer\n\nThis is a higher-level producer API for Kafka and is provided by the\nmodule `kafka::producer`. It provides convenient automatic partition\nassignment capabilities through partitioners. This is the API a\nclient application of this library wants to use for sending messages\nto Kafka.\n\n## KafkaClient\n\n`KafkaClient` in the `kafka::client` module is the central point of\nthis API. However, this is a mid-level abstraction for Kafka rather\nsuitable for building higher-level APIs. Applications typically want\nto use the already mentioned `Consumer` and `Producer`.\nNevertheless, the main features or `KafkaClient` are:\n\n- Loading metadata\n- Fetching topic offsets\n- Sending messages\n- Fetching messages\n- Committing a consumer group's offsets\n- Fetching a consumer group's offsets\n\n## Bugs / Features / Contributing\n\nThere's still a lot of room for improvement on `kafka-rust`.\nNot everything works right at the moment, and testing coverage could be better.\n**Use it in production at your own risk.** Have a look at the\n[issue tracker](https://github.com/spicavigo/kafka-rust/issues) and feel free\nto contribute by reporting new problems or contributing to existing\nones. Any constructive feedback is warmly welcome!\n\nAs usually with open source, don't hesitate to fork the repo and\nsubmit a pull request if you see something to be changed. We'll be\nhappy to see `kafka-rust` improving over time.\n\n### Integration tests\n\nWhen working locally, the integration tests require that you must have\nDocker (1.10.0+) and docker-compose (1.6.0+) installed and run the tests via the\nincluded `run-all-tests` script in the `tests` directory. See the `run-all-tests`\nscript itself for details on its usage.\n\n## Creating a topic\n\nNote unless otherwise explicitly stated in the documentation, this\nlibrary will ignore requests to topics which it doesn't know about.\nIn particular it will not try to retrieve messages from\nnon-existing/unknown topics. (This behavior is very likely to change\nin future version of this library.)\n\nGiven a local kafka server installation you can create topics with the\nfollowing command (where `kafka-topics.sh` is part of the Kafka\ndistribution):\n\n```\nkafka-topics.sh --topic my-topic --create --zookeeper localhost:2181 --partitions 1 --replication-factor 1\n```\n\nZookeeper will be removed in the next major kafka release. Using `--bootstrap-server` to be more ready.\n\n```\nkafka-topics.sh --topic my-topic --create --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1\n```\n\nSee also [Kafka's quickstart guide](https://kafka.apache.org/documentation.html#quickstart)\nfor more information.\n\n## Alternative/Related projects\n\n- [rust-rdkafka](https://github.com/fede1024/rust-rdkafka) is an emerging alternative Kafka client library for Rust based on\n  `librdkafka`. rust-rdkafka provides a safe Rust interface to librdkafka.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkafka-rust%2Fkafka-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkafka-rust%2Fkafka-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkafka-rust%2Fkafka-rust/lists"}