{"id":23046861,"url":"https://github.com/chinmayvivek/rust-kafka","last_synced_at":"2026-05-09T15:18:02.912Z","repository":{"id":249314689,"uuid":"831172604","full_name":"CHINMAYVIVEK/rust-kafka","owner":"CHINMAYVIVEK","description":"This project demonstrates a simple integration of Apache Kafka with Rust using the rdkafka crate. It includes basic examples of how to create a Kafka consumer and producer, showcasing how to send and receive messages.","archived":false,"fork":false,"pushed_at":"2024-07-19T21:02:35.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T16:46:07.798Z","etag":null,"topics":["docker","docker-compose","kafka","kafka-consumer","kafka-producer","rust","rust-lang"],"latest_commit_sha":null,"homepage":"https://chinmayvivek.github.io","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/CHINMAYVIVEK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-19T20:51:48.000Z","updated_at":"2024-07-19T21:02:38.000Z","dependencies_parsed_at":"2024-07-20T01:43:11.516Z","dependency_job_id":null,"html_url":"https://github.com/CHINMAYVIVEK/rust-kafka","commit_stats":null,"previous_names":["chinmayvivek/rust-kafka"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHINMAYVIVEK%2Frust-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHINMAYVIVEK%2Frust-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHINMAYVIVEK%2Frust-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHINMAYVIVEK%2Frust-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CHINMAYVIVEK","download_url":"https://codeload.github.com/CHINMAYVIVEK/rust-kafka/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927809,"owners_count":20856193,"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":["docker","docker-compose","kafka","kafka-consumer","kafka-producer","rust","rust-lang"],"created_at":"2024-12-15T22:29:51.782Z","updated_at":"2026-05-09T15:17:57.852Z","avatar_url":"https://github.com/CHINMAYVIVEK.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Kafka\n\n# Rust Kafka Integration with Docker\n\nThis project demonstrates a simple integration of Apache Kafka with Rust using the `rdkafka` crate. It includes examples of a Kafka consumer and producer, showcasing how to send and receive messages. Kafka and Zookeeper are run using Docker for ease of setup and management.\n\n## Features\n\n- **Kafka Consumer**: Consumes messages from a Kafka topic and processes them.\n- **Kafka Producer**: Sends messages to a Kafka topic.\n- **Async Processing**: Utilizes Rust's async capabilities for non-blocking message handling.\n- **Dockerized Kafka and Zookeeper**: Uses Docker to simplify the setup and management of Kafka and Zookeeper.\n\n## Prerequisites\n\n- Rust (latest stable version recommended)\n- Docker and Docker Compose\n- Cargo (Rust's package manager)\n\n## Getting Started\n\n### Step 1: Clone the Repository\n\n```bash\ngit clone https://github.com/chinmayvivek/rust-kafka.git\ncd rust-kafka\n```\n\n\n\n### Step 2: Setup Kafka and Zookeeper using Docker\n\n1. **Ensure Docker is installed and running on your system**.\n2. **Start Kafka and Zookeeper**:\n\n   ```bash\n   docker-compose up\n   ```\n\n   This command will pull the necessary Docker images and start the containers for Kafka and Zookeeper as defined in the `docker-compose.yml` file.\n\n### Step 3: Run the project\n\n```bash\ncargo run cargo run --quiet\n```\n\n\n## Project Structure\n\n- `src/consumer.rs`: Contains the implementation of the Kafka consumer.\n- `src/producer.rs`: Contains the implementation of the Kafka producer.\n- `docker-compose.yml`: Docker Compose configuration file for Kafka and Zookeeper.\n\n## Configuration\n\nUpdate the Kafka settings in the `src/consumer.rs` and `src/producer.rs` files if necessary:\n\n```rust\n// Consumer\n.set(\"bootstrap.servers\", \"localhost:9092\")\n.set(\"group.id\", \"test-group\")\n.set(\"auto.offset.reset\", \"earliest\")\n\n// Producer\n.set(\"bootstrap.servers\", \"localhost:9092\")\n```\n\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [Apache Kafka](https://kafka.apache.org/)\n- [Rust rdkafka crate](https://docs.rs/rdkafka/)\n- [Docker](https://www.docker.com/)\n\nFeel free to open issues or pull requests if you have any suggestions or improvements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinmayvivek%2Frust-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinmayvivek%2Frust-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinmayvivek%2Frust-kafka/lists"}