The Ruby examples provided in this repository are based on an outdated and no longer maintained library, rather than using rdkafka-ruby, which is a more current and actively supported binding to librdkafka.
The ruby-kafka repo clearly states:
This library is no longer actively developed and has been superseded by librdkafka via rdkafka-ruby bindings. While this library may still receive security patches and bug fixes, it is no longer recommended for production usage.
The Ruby examples provided in this repository are based on an outdated and no longer maintained library, rather than using rdkafka-ruby, which is a more current and actively supported binding to librdkafka.
The ruby-kafka repo clearly states: