lib/rdkafka/config.rb in rdkafka-0.18.0 vs lib/rdkafka/config.rb in rdkafka-0.19.0
- old
+ new
@@ -336,10 +336,12 @@
# Set error callback
Rdkafka::Bindings.rd_kafka_conf_set_error_cb(config, Rdkafka::Bindings::ErrorCallback)
# Set oauth callback
- Rdkafka::Bindings.rd_kafka_conf_set_oauthbearer_token_refresh_cb(config, Rdkafka::Bindings::OAuthbearerTokenRefreshCallback)
+ if Rdkafka::Config.oauthbearer_token_refresh_callback
+ Rdkafka::Bindings.rd_kafka_conf_set_oauthbearer_token_refresh_cb(config, Rdkafka::Bindings::OAuthbearerTokenRefreshCallback)
+ end
end
end
def native_kafka(config, type)
error_buffer = FFI::MemoryPointer.from_string(" " * 256)