Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for Producer header support #566

Closed
andreportela opened this issue Nov 1, 2019 · 3 comments · Fixed by #650
Closed

Improve documentation for Producer header support #566

andreportela opened this issue Nov 1, 2019 · 3 comments · Fixed by #650
Milestone

Comments

@andreportela
Copy link
Contributor

I spent some time trying to debug this and searching the internet.

I was trying to pass headers like
headers = [("key", "value"), ...] or headers = [(b"key", b"value"), ...]

In the end, the right way to do it is headers = [("key", b"value"), ...]. I finally found it in a test on #471
Where can we document this? I would be happy to open a PR.

@tvoinarovskyi
Copy link
Member

I would be grateful if you could. I agree we need to document this behaviour, as it's far from obvious.

@andreportela
Copy link
Contributor Author

Anywhere in particular? Or should I just dig a little and put it where I see fit?

@tvoinarovskyi
Copy link
Member

For one it should be described in API reference here https://aiokafka.readthedocs.io/en/stable/api.html?highlight=headers#aiokafka.AIOKafkaProducer.send. You can update it using the docstring https://github.com/aio-libs/aiokafka/blob/master/aiokafka/producer/producer.py#L364.

Maybe a few words in producer docs, as it's more a problem to send proper structure than to read what you got.

@tvoinarovskyi tvoinarovskyi added this to the 0.6.1 milestone May 11, 2020
andreportela added a commit to andreportela/aiokafka that referenced this issue Aug 13, 2020
@andreportela andreportela mentioned this issue Aug 13, 2020
4 tasks
@helpr helpr bot added the pr-available label Aug 13, 2020
tvoinarovskyi pushed a commit that referenced this issue Oct 16, 2020
* docstring for header support in Producer.send

closes #566

* news fragment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants