librdkafka
librdkafka copied to clipboard
Add C++ support for the resolve and connect callbacks (and associated tests)
This pull request adds C++ bindings to the existing "resolve_cb" and "connect_cb" callbacks provided in librdkafka. We found use for these to hook the resolver calls for transparent proxy redirection, but using the C bindings directly in C++ alongside the existing C++ client doesn't expose the opaque pointer.
I also added a new set of tests (0150-test_resolve_connect_callbacks), which tests both the resolve and connect callbacks in a way similar to the existing C tests.
Thanks! -Erik
Hi reviewers - this is my first PR to librdkafka (with some changes that we're using today, and I think will potentially be useful to others making use of the C++ bindings). If there's any more information you need to review this, please let me know - thanks!