Advanced use cases for librdkafka are documented in the librdkafka wiki.
You may also want to take a look at Kafka Streams, which is a powerful, easy-to-use library for building highly scalable, fault-tolerant, distributed stream processing applications on top of Kafka.
- Kafka Consumers
- Kafka Producers
- API Docs