Skip to content

Language bindings development

Magnus Edenhill edited this page Apr 8, 2016 · 6 revisions

Recommendations for language binding developers

Expose the configuration interface pass-thru

librdkafka's key=value configuration property interface controls most runtime behaviour and evolves over time. Most features are also only configuration based, meaning that they do not require a new API (SSL and SASL are two good examples which are purely enabled through configuration properties).

If your language binding allows configuration properties to be set in a pass-through fashion without any pre-checking done by your binding code it means that a simple upgrade of the underlying librdkafka library (but not your bindings) will provide new features to the user.

Error constants

The error constants, both the official (value >= 0) errors as well as the internal (value < 0) evolve constantly. To avoid hard-coding them to expose to your users, librdkafka now provides an API to extract the full list programmatically during runtime, see rd_kafka_get_err_descs().

Documentation reuse

You are free to reuse the librdkafka API and CONFIGURATION documentation in your project, but please do return any documentation improvements back to librdkafka (file a github pull request).