librdkafka icon indicating copy to clipboard operation
librdkafka copied to clipboard

Add C++ support for the resolve and connect callbacks (and associated tests)

Open mdb-ebeebe opened this issue 1 year ago • 5 comments

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

mdb-ebeebe avatar Jan 09 '24 20:01 mdb-ebeebe

CLA assistant check
All committers have signed the CLA.

cla-assistant[bot] avatar Jan 09 '24 20:01 cla-assistant[bot]

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!

mdb-ebeebe avatar Jun 04 '24 15:06 mdb-ebeebe