-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Do you have to specify a callback function for the rd_kafka_poll() to work? #37
Comments
You will need to set a dr_cb (delivery report callback) and then call rd_kafka_poll() to get indication if a message was delivered or not. Use rd_kafka_conf_set_dr_cb(), you can look at examples/rdkafka_performance.c for an example. Even if you dont set a dr_cb, librdkafka will respect your request.required.acks setting and make sure the message does indeed receive the requested number of acks, or else it will retry the transmission. |
I'm pretty sure poll never returns 1 though if no callback is specified On Friday, December 27, 2013, Magnus Edenhill wrote:
|
rd_kafka_poll() simply returns the number of internal events served, and not all of them depend on the application having configured a callback. |
I indicated request.required.acks=1 and am polling in a loop until I get a return value of 1. I have not specified a callback function (I may do this later), but I find that it doesn't ever seem to return 1? Is a callback function required?
In a different program I do have a callback function and it seems to work as expected.
The text was updated successfully, but these errors were encountered: