-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Feature Request: Rust Client Examples
Description
We would like to request the addition of Rust client examples to the client-examples directory, similar to the existing Java, C++, Go, and Python examples.
Motivation
Rust is gaining significant popularity in the systems programming community, especially for high-performance applications. Having Rust client examples would:
- Help Rust developers quickly get started with AutoMQ
- Demonstrate AutoMQ's performance capabilities in a systems programming language
- Complete the language coverage for major programming languages
- Provide examples for the growing Rust ecosystem in data streaming applications
Proposed Structure
Following the pattern of existing client examples, the Rust implementation should include:
client-examples/rust/
├── Cargo.toml
├── Dockerfile
├── README.md
├── docker-compose.yml
├── run-examples.sh
├── logs/
└── src/
├── main.rs
├── config/
│ └── automq_config.rs
└── examples/
├── simple_message_example.rs
└── transactional_message_example.rs
Expected Features
- Simple Message Example: Basic producer and consumer functionality
- Transactional Message Example: Demonstrate transactional messaging capabilities
- AutoMQ Performance Tuning: Include AutoMQ-specific optimizations
- Docker Support: Docker Compose setup for easy testing
- Configuration Management: Environment variable support for flexible configuration
- Performance Metrics: Throughput and latency measurements
- Comprehensive Documentation: Clear setup and usage instructions
Technical Requirements
- Use
rdkafkacrate (Rust Kafka client) - Follow Rust best practices and idioms
- Include proper error handling
- Support async/await patterns
- Provide both blocking and non-blocking examples
- Include unit tests
Dependencies
rdkafka- Kafka client librarytokio- Async runtimeserde- Serialization frameworkclap- Command line argument parsingenv_logger- Logging
Reference
Please refer to existing client examples for consistency:
Additional Notes
- Ensure compatibility with both AutoMQ Open Source and AutoMQ Cloud Service
- Include examples for both single-node and cluster configurations
- Provide clear migration guides from other Kafka Rust clients
This addition would greatly benefit the Rust community and showcase AutoMQ's versatility across different programming ecosystems.
Metadata
Metadata
Assignees
Labels
No labels