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

stats_cb support #798

Merged
merged 1 commit into from
Mar 13, 2019
Merged

stats_cb support #798

merged 1 commit into from
Mar 13, 2019

Conversation

fkulakov
Copy link

Hello. I wants to support stats_cb config field first of all for my own needs but for overall system flexibility too.

@Steveb-p
Copy link
Contributor

While configuration-wise it should work, it will probably fail due to #749. Specifically because librdkafka::poll is never called internally, which also causes any callbacks to not fire.

I'll look into fixing the abovementioned issue tonight, if that's alright for you @fkulakov.

See: https://github.com/edenhill/librdkafka/wiki/Consumer-lag-monitoring

librdkafka automatically monitors consumer lag for RD_KAFKA_CONSUMER handles and the information is available in the statistics JSON object as emitted by stats_cb. A statistics callback is set up with rd_kafka_conf_set_stats_cb() and the callback is called at the configured interval (statistics.interval.ms) from an rd_kafka_poll() call.

@Steveb-p Steveb-p merged commit 0652c5c into php-enqueue:master Mar 13, 2019
@Steveb-p
Copy link
Contributor

Totally forgot :)
Thanks for contributing @fkulakov

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

Successfully merging this pull request may close these issues.

2 participants