librdkafka
The Apache Kafka C/C++ client library
|
Apache Kafka C/C++ consumer and producer client library. More...
Go to the source code of this file.
Data Structures | |
class | RdKafka::DeliveryReportCb |
Delivery Report callback class. More... | |
class | RdKafka::PartitionerCb |
Partitioner callback class. More... | |
class | RdKafka::PartitionerKeyPointerCb |
Variant partitioner with key pointer. More... | |
class | RdKafka::EventCb |
Event callback class. More... | |
class | RdKafka::Event |
Event object class as passed to the EventCb callback. More... | |
class | RdKafka::ConsumeCb |
Consume callback class. More... | |
class | RdKafka::RebalanceCb |
KafkaConsunmer: Rebalance callback class More... | |
class | RdKafka::OffsetCommitCb |
Offset Commit callback class. More... | |
class | RdKafka::SocketCb |
Portability: SocketCb callback class More... | |
class | RdKafka::OpenCb |
Portability: OpenCb callback class More... | |
class | RdKafka::Conf |
Configuration interface. More... | |
class | RdKafka::Handle |
Base handle, super class for specific clients. More... | |
class | RdKafka::TopicPartition |
Topic+Partition. More... | |
class | RdKafka::Topic |
Topic handle. More... | |
class | RdKafka::MessageTimestamp |
Message timestamp object. More... | |
class | RdKafka::Message |
Message object. More... | |
class | RdKafka::Queue |
Queue interface. More... | |
class | RdKafka::KafkaConsumer |
High-level KafkaConsumer (for brokers 0.9 and later) More... | |
class | RdKafka::Consumer |
Simple Consumer (legacy) More... | |
class | RdKafka::Producer |
Producer. More... | |
class | RdKafka::BrokerMetadata |
Metadata: Broker information. More... | |
class | RdKafka::PartitionMetadata |
Metadata: Partition information. More... | |
class | RdKafka::TopicMetadata |
Metadata: Topic information. More... | |
class | RdKafka::Metadata |
Metadata container. More... | |
Miscellaneous APIs | |
#define | RD_KAFKA_VERSION 0x000905ff |
librdkafka version More... | |
RD_EXPORT int | RdKafka::version () |
Returns the librdkafka version as integer. More... | |
RD_EXPORT std::string | RdKafka::version_str () |
Returns the librdkafka version as string. | |
RD_EXPORT std::string | RdKafka::get_debug_contexts () |
Returns a CSV list of the supported debug contexts for use with Conf::Set("debug", ..). | |
RD_EXPORT int | RdKafka::wait_destroyed (int timeout_ms) |
Wait for all rd_kafka_t objects to be destroyed. More... | |
Apache Kafka C/C++ consumer and producer client library.
rdkafkacpp.h contains the public C++ API for librdkafka. The API is documented in this file as comments prefixing the class, function, type, enum, define, etc. For more information, see the C interface in rdkafka.h and read the manual in INTRODUCTION.md. The C++ interface is STD C++ '03 compliant and adheres to the Google C++ Style Guide.
#define RD_KAFKA_VERSION 0x000905ff |
librdkafka version
Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
enum RdKafka::ErrorCode |
Error codes.
The negative error codes delimited by two underscores (_ERR__
..) denotes errors internal to librdkafka and are displayed as "Local:
<error string..>", while the error codes delimited by a single underscore (ERR_
..) denote broker errors and are displayed as "Broker:
<error string..>".
Enumerator | |
---|---|
ERR__BEGIN | Begin internal error codes |
ERR__BAD_MSG | Received message is incorrect |
ERR__BAD_COMPRESSION | Bad/unknown compression |
ERR__DESTROY | Broker is going away |
ERR__FAIL | Generic failure |
ERR__TRANSPORT | Broker transport failure |
ERR__CRIT_SYS_RESOURCE | Critical system resource |
ERR__RESOLVE | Failed to resolve broker |
ERR__MSG_TIMED_OUT | Produced message timed out |
ERR__PARTITION_EOF | Reached the end of the topic+partition queue on the broker. Not really an error. |
ERR__UNKNOWN_PARTITION | Permanent: Partition does not exist in cluster. |
ERR__FS | File or filesystem error |
ERR__UNKNOWN_TOPIC | Permanent: Topic does not exist in cluster. |
ERR__ALL_BROKERS_DOWN | All broker connections are down. |
ERR__INVALID_ARG | Invalid argument, or invalid configuration |
ERR__TIMED_OUT | Operation timed out |
ERR__QUEUE_FULL | Queue is full |
ERR__ISR_INSUFF | ISR count < required.acks |
ERR__NODE_UPDATE | Broker node update |
ERR__SSL | SSL error |
ERR__WAIT_COORD | Waiting for coordinator to become available. |
ERR__UNKNOWN_GROUP | Unknown client group |
ERR__IN_PROGRESS | Operation in progress |
ERR__PREV_IN_PROGRESS | Previous operation in progress, wait for it to finish. |
ERR__EXISTING_SUBSCRIPTION | This operation would interfere with an existing subscription |
ERR__ASSIGN_PARTITIONS | Assigned partitions (rebalance_cb) |
ERR__REVOKE_PARTITIONS | Revoked partitions (rebalance_cb) |
ERR__CONFLICT | Conflicting use |
ERR__STATE | Wrong state |
ERR__UNKNOWN_PROTOCOL | Unknown protocol |
ERR__NOT_IMPLEMENTED | Not implemented |
ERR__AUTHENTICATION | Authentication failure |
ERR__NO_OFFSET | No stored offset |
ERR__OUTDATED | Outdated |
ERR__TIMED_OUT_QUEUE | Timed out in queue |
ERR__UNSUPPORTED_FEATURE | Feature not supported by broker |
ERR__WAIT_CACHE | Awaiting cache update |
ERR__END | End internal error codes |
ERR_UNKNOWN | Unknown broker error |
ERR_NO_ERROR | Success |
ERR_OFFSET_OUT_OF_RANGE | Offset out of range |
ERR_INVALID_MSG | Invalid message |
ERR_UNKNOWN_TOPIC_OR_PART | Unknown topic or partition |
ERR_INVALID_MSG_SIZE | Invalid message size |
ERR_LEADER_NOT_AVAILABLE | Leader not available |
ERR_NOT_LEADER_FOR_PARTITION | Not leader for partition |
ERR_REQUEST_TIMED_OUT | Request timed out |
ERR_BROKER_NOT_AVAILABLE | Broker not available |
ERR_REPLICA_NOT_AVAILABLE | Replica not available |
ERR_MSG_SIZE_TOO_LARGE | Message size too large |
ERR_STALE_CTRL_EPOCH | StaleControllerEpochCode |
ERR_OFFSET_METADATA_TOO_LARGE | Offset metadata string too large |
ERR_NETWORK_EXCEPTION | Broker disconnected before response received |
ERR_GROUP_LOAD_IN_PROGRESS | Group coordinator load in progress |
ERR_GROUP_COORDINATOR_NOT_AVAILABLE | Group coordinator not available |
ERR_NOT_COORDINATOR_FOR_GROUP | Not coordinator for group |
ERR_TOPIC_EXCEPTION | Invalid topic |
ERR_RECORD_LIST_TOO_LARGE | Message batch larger than configured server segment size |
ERR_NOT_ENOUGH_REPLICAS | Not enough in-sync replicas |
ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND | Message(s) written to insufficient number of in-sync replicas |
ERR_INVALID_REQUIRED_ACKS | Invalid required acks value |
ERR_ILLEGAL_GENERATION | Specified group generation id is not valid |
ERR_INCONSISTENT_GROUP_PROTOCOL | Inconsistent group protocol |
ERR_INVALID_GROUP_ID | Invalid group.id |
ERR_UNKNOWN_MEMBER_ID | Unknown member |
ERR_INVALID_SESSION_TIMEOUT | Invalid session timeout |
ERR_REBALANCE_IN_PROGRESS | Group rebalance in progress |
ERR_INVALID_COMMIT_OFFSET_SIZE | Commit offset data size is not valid |
ERR_TOPIC_AUTHORIZATION_FAILED | Topic authorization failed |
ERR_GROUP_AUTHORIZATION_FAILED | Group authorization failed |
ERR_CLUSTER_AUTHORIZATION_FAILED | Cluster authorization failed |
RD_EXPORT int RdKafka::version | ( | ) |
Returns the librdkafka version as integer.
RD_EXPORT int RdKafka::wait_destroyed | ( | int | timeout_ms | ) |
Wait for all rd_kafka_t objects to be destroyed.
wait_destroyed()
function can be used for applications where a clean shutdown is required.