|
librdkafka
The Apache Kafka C/C++ client library
|
Partitioner callback class. More...
#include <rdkafkacpp.h>
Public Member Functions | |
| virtual int32_t | partitioner_cb (const Topic *topic, const std::string *key, int32_t partition_cnt, void *msg_opaque)=0 |
| Partitioner callback. More... | |
Partitioner callback class.
Generic partitioner callback class for implementing custom partitioners.
"partitioner_cb"
|
pure virtual |
Partitioner callback.
Return the partition to use for key in topic.
The msg_opaque is the same msg_opaque provided in the RdKafka::Producer::produce() call.
key may be NULL or the empty.partition_cnt (non-inclusive). May return RD_KAFKA_PARTITION_UA (-1) if partitioning failed.