haskell-works / hw-kafka-client

Kafka client for Haskell, including auto-rebalancing consumers
MIT License
140 stars 50 forks source link

doc(kafka): Add documentation #140

Closed sir4ur0n closed 4 years ago

sir4ur0n commented 4 years ago

Hi @AlexeyRaga

Having used this library for a while (and it works pretty much flawlessly), I think it's time I contribute back to it! What better way to contribute to a Haskell library than to (try to) improve documentation for future users :smile:

Here's a first PR where I added various documentation, mainly for Consumer module (and common types which appear in Consumer).

Note that I wasn't always sure what was from Kafka, what was from librdkafka and what was specific to this library, I did my best but please check and let me know if I made mistakes.

When pure Kafka stuff, I tried to add links to Kafka documentation to help users know how to configure (e.g. the ResetOffset)

When librdkafka stuff, I did my best to understand what's going on (I've improved on reading the C-Haskell binding file but I can't claim I'm fluent yet :smile: ) and explain accordingly. I would be surprised if I didn't do any mistake, or misexplained (is that even a word?) some things.

If you're ok with this PR, I will find some time to add documentation for Producer and other modules in another PR.

Again, thank you for this library, it's awesome and It Just Works™, we've been using it for 1 year in production. I hope this PR serves this library well!

AlexeyRaga commented 4 years ago

Awesome, thanks!