librdkafka
The Apache Kafka C/C++ client library
|
Configuration interface. More...
#include <rdkafkacpp.h>
Public Types | |
enum | ConfType { CONF_GLOBAL, CONF_TOPIC } |
Configuration object type. More... | |
enum | ConfResult { CONF_UNKNOWN = -2, CONF_INVALID = -1, CONF_OK = 0 } |
RdKafka::Conf::Set() result code. More... | |
Public Member Functions | |
virtual Conf::ConfResult | set (const std::string &name, const std::string &value, std::string &errstr)=0 |
Set configuration property name to value value . More... | |
virtual Conf::ConfResult | set (const std::string &name, ConsumeCb *consume_cb, std::string &errstr)=0 |
Use with name = "consume_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, DeliveryReportCb *dr_cb, std::string &errstr)=0 |
Use with name = "dr_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, EventCb *event_cb, std::string &errstr)=0 |
Use with name = "event_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, const Conf *topic_conf, std::string &errstr)=0 |
Use with name = "default_topic_conf" . More... | |
virtual Conf::ConfResult | set (const std::string &name, PartitionerCb *partitioner_cb, std::string &errstr)=0 |
Use with name = "partitioner_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, PartitionerKeyPointerCb *partitioner_kp_cb, std::string &errstr)=0 |
Use with name = "partitioner_key_pointer_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, SocketCb *socket_cb, std::string &errstr)=0 |
Use with name = "socket_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, OpenCb *open_cb, std::string &errstr)=0 |
Use with name = "open_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, RebalanceCb *rebalance_cb, std::string &errstr)=0 |
Use with name = "rebalance_cb" . | |
virtual Conf::ConfResult | set (const std::string &name, OffsetCommitCb *offset_commit_cb, std::string &errstr)=0 |
Use with name = "offset_commit_cb" . | |
virtual Conf::ConfResult | get (const std::string &name, std::string &value) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (DeliveryReportCb *&dr_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (EventCb *&event_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (PartitionerCb *&partitioner_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (PartitionerKeyPointerCb *&partitioner_kp_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (SocketCb *&socket_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (OpenCb *&open_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (RebalanceCb *&rebalance_cb) const =0 |
Query single configuration value. More... | |
virtual Conf::ConfResult | get (OffsetCommitCb *&offset_commit_cb) const =0 |
Query single configuration value. More... | |
virtual std::list< std::string > * | dump ()=0 |
Dump configuration names and values to list containing name,value tuples. | |
Static Public Member Functions | |
static Conf * | create (ConfType type) |
Create configuration object. | |
Configuration interface.
Holds either global or topic configuration that are passed to RdKafka::Consumer::create(), RdKafka::Producer::create(), RdKafka::KafkaConsumer::create(), etc.
Configuration object type.
Enumerator | |
---|---|
CONF_GLOBAL | Global configuration |
CONF_TOPIC | Topic specific configuration |
|
pure virtual |
Set configuration property name
to value value
.
Fallthrough: Topic-level configuration properties may be set using this interface in which case they are applied on the default_topic_conf
. If no default_topic_conf
has been set one will be created. Any sub-sequent set("default_topic_conf", ..) calls will replace the current default topic configuration.
errstr
on error.
|
pure virtual |
Use with name
= "default_topic_conf"
.
Sets the default topic configuration to use for for automatically subscribed topics.
|
pure virtual |
Query single configuration value.
Do not use this method to get callbacks registered by the configuration file. Instead use the specific get() methods with the specific callback parameter in the signature.
Fallthrough: Topic-level configuration properties from the default_topic_conf
may be retrieved using this interface.
value
.
|
pure virtual |
Query single configuration value.
dr_cb
.
|
pure virtual |
Query single configuration value.
event_cb
.
|
pure virtual |
Query single configuration value.
partitioner_cb
.
|
pure virtual |
Query single configuration value.
partitioner_kp_cb
.
|
pure virtual |
Query single configuration value.
socket_cb
.
|
pure virtual |
Query single configuration value.
open_cb
.
|
pure virtual |
Query single configuration value.
rebalance_cb
.
|
pure virtual |
Query single configuration value.
offset_commit_cb
.