This looks pretty cool. Are there tests or example programs demonstrating use?
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.