-
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
kafka taking 10's of seconds to initialize #1597
Comments
The initial connection should be instantaneous, I suggest you enable debugging to figure out what is going on by setting the |
Hi Magnus, I've done some debugging - first, as you suggested, by enabling the
Not sure what this log output is telling me - I'd appreciate any more tips on how I can determine what's going on here... Thanks! |
Hi Magnus, The APIVERSION_QUERY log message gave me a clue - brought to mind something you wrote in one of your articles about how the API version query functionality was broken below a certain version of the broker (I think). I tried my test program with version 2.12-0.11.0.0 and the 12-second delay disappeared. Is this a bug in librdkafka related to how it talks to broker version 2.10-0.9.0.1 or is it just that that version of the broker can't handle a version query properly? Here's the log output with broker version 2.12-0.11.0.0:
We are updating our broker sometime in the near future, but this code has to work with the 0.9.0.1 broker in the meantime. Disable API version check, perhaps? Thanks! |
Hi Magnus, Don't you just love it when your customer figures out his own problem? :) I followed the instructions at: https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility and my 12 second delay went away. You can close this one. Thanks for the great feedback! |
Glad to be of service ;) |
Description
I have a simple shared library that requires kafka to be up and running before a consumer may make requests to that library. The broker is running on the local host. To be sure the kafka bus is up on the local host, we run rd_kafka_metadata first with our localhost broker bootstrap URL. Getting the broker metadata can take many seconds - 10-15 - just to establish the connection with the broker (before it even attempts to obtain the metadata - I stepped into rd_kafka_metadata to see what it was doing and it returns RD_KAFKA_RESP_ERR__TRANSPORT many times before finally getting past that point and retrieving metadata).
Since it's localhost-only infrastructure, it would seem possible to establish such a connection in less than a second normally.
I'm using librdkafka 0.11.1 on CentOS 7 against a 2.10-0.9.0.1 kafka broker all on one host.
The text was updated successfully, but these errors were encountered: