-
Notifications
You must be signed in to change notification settings - Fork 659
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
order-dependent configuration failure with plugin.library.paths monitoring-interceptor #225
Comments
Thanks for reporting this @dtheodor, we actually ran into this issue with the python client recently as well. To fix this the property Let me know, |
I can do a PR. Thinking of extending the following snippet with something like this confluent-kafka-go/kafka/config.go Lines 130 to 133 in 5e4d04e
func configConvertAnyconf(m ConfigMap, anyconf rdkAnyconf) (err error) {
// set the plugin.library.paths first
paths, exist := m["plugin.library.paths"]
if exist {
anyconfSet(anyconf, "plugin.library.paths", paths)
delete(m, "plugin.library.paths") // not sure if this is needed
}
for k, v := range m {
// .. the config property loop unchanged |
Also an idea is not to impose ordering in the client libraries, but fix this in librdkakfa, by exposing some "finalize configuration" function that will collect all config values set through |
I had a similar discussion with @edenhill while fixing the Python client. In the end it was decided that the client bindings should handle this. That said @edenhill is a very reasonable man so you may be able to convince him otherwise. I recommend opening an issue for discussion within the librdkafka repo. Go ahead and submit a PR for the client binding though so we can get this fixed sooner rather than later. We can always back the fix out later if you can convince Magnus to solve this in librdkafka. |
…dtheodor) * Make sure plugins are set before other configuration options Any plugin-specific configuration can only be set after the plugin has itself been set, so make sure plugins are set first * add confluent-librdkafka-plugins to travis * skip test if monitoring-interceptor shared library is missing * travis: only install confluent-librdkafka-plugins on linux * update error description
Any plugin-specific configuration properties fail to be set if the plugin has not been registered with the property
"plugin.library.paths"
, with an error that looks like thispanic: No such configuration property: "confluent.monitoring.interceptor.icdebug"
However, there's no way to specify ordering of configuration properties through a
ConfigMap
, which is just a map with keys that are returned in random order. When instantiating a client, there's a loop over the map's keys, and each of them is set throughC.rd_kafka_conf_set
which will fail immediately for any unrecognized propertyconfluent-kafka-go/kafka/config.go
Lines 130 to 132 in 5e4d04e
That means that about 50% of the time I am starting my program and I set any
confluent.monitoring.interceptor.*
property the program crashes withpanic: No such configuration property
because theconfluent.monitoring.interceptor.*
came before the"plugin.library.paths": "monitoring-interceptor"
property during the iteration over the config keys.Running librdkafka 0.11.5 and confluent-kafka-go version v0.11.4
The text was updated successfully, but these errors were encountered: