Kafka Client for Rust



I have create Kafka client for Rust. The client supports Metadata, Produce, Fetch, and Offset requests. I plan to add support of Consumers soon.

I am using 1.0.0-beta

code: https://github.com/spicavigo/kafka-rust
doc: http://fauzism.co/rustdoc/kafka/index.html
crate: kafka

I started learning Rust a week ago so any feedback will be useful.



This looks pretty cool. Are there tests or example programs demonstrating use?

Regarding KafkaClient, maybe it should have an interface that mirrors the mpsc library. Maybe there is a more appropriate library with more appropriate interfaces, I’m not sure. But I think fetch_messages copying everything into a vector on each call is a bit of a weird way to do it. I don’t know Kafka aside from the general overview, but whenever I’ve used pubsub systems I’ve always received an iterator over the messages or a callback for each message. If I wanted to collect them into a structure, it’s usually left to the user.

Anyway, that’s my initial impression. It’s really impressive work for only a week w/ the language, imo.



I am in the middle of implementing an iterator return instead of a vector copy. It was bugging me too.

If you see any other problem with the code, or have any advice, please do share.