Skip to content

Conversation

@johnistan
Copy link
Contributor

I am actively investigating this client and needed topic lag for consumers. I exposed the underlying on_stats callback in librdkafka.

If you would actually like to use this it needs doc strings and likely the addition of the same callback in the producer.

Also, I wanted to expose a dict to the callback. I have no idea if just calling the builtin python json module is a good idea. My C/python C-api skills are limited.

Also, this api is good for my consumers. However, I also have use cases for synchronous querying of the offset lag and current offsets in a topic within a monitoring client(i.e. no active consumption is occurring). Does librdkafka support something like this, or is it only a callback.

@ghost
Copy link

ghost commented May 27, 2016

Hey @jofusa,
thank you for your Pull Request.

@confluentinc It looks like this brave person signed our Contributor License Agreement. 👍

Always at your service,

clabot

@edenhill
Copy link
Contributor

edenhill commented Jun 4, 2016

Thanks for your PR.

I do agree that the stats callback is indeed useful and it should be exposed.
But I'm not certain that auto-translating to a dict is the right choice, it increases the C complexity unproportionally to what the corresponding Python code would be (about two lines of code, including import). Let's see if it makes sense to move the JSON conversion to the Python shim.

@edenhill edenhill added the enhancement Requesting a feature change label Jun 4, 2016
@drice drice mentioned this pull request Aug 4, 2016
@edenhill
Copy link
Contributor

edenhill commented Nov 2, 2016

Thanks for your contribution, this was added as part of #55

@edenhill edenhill closed this Nov 2, 2016
dtheodor pushed a commit to dtheodor/confluent-kafka-python that referenced this pull request Sep 4, 2018
Replace stringable with fmt.Stringer
marcin-krystianc pushed a commit to marcin-krystianc/confluent-kafka-python that referenced this pull request Aug 5, 2025
…0+gr.1 (confluentinc#7)

* Fix loading of private symbols within cimpl

* Bump version to 2.11.0+gr.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Requesting a feature change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants