From e151bc8af5cb2f5ef64f2b2f318e9010fb17f6fa Mon Sep 17 00:00:00 2001 From: <> Date: Sun, 28 Jan 2024 18:30:44 +0000 Subject: [PATCH] Deployed c89ff42 with MkDocs version: 1.5.3 --- .nojekyll | 0 404.html | 2715 ++ .../Admin/AlterConfigsOptions/index.html | 2890 ++ api/RdKafka/Admin/Client/index.html | 3455 ++ api/RdKafka/Admin/ConfigEntry/index.html | 3086 ++ api/RdKafka/Admin/ConfigResource/index.html | 2964 ++ .../Admin/ConfigResourceResult/index.html | 3023 ++ .../Admin/CreatePartitionsOptions/index.html | 2890 ++ .../Admin/CreateTopicsOptions/index.html | 2890 ++ .../DeleteConsumerGroupOffsets/index.html | 2935 ++ .../index.html | 2890 ++ api/RdKafka/Admin/DeleteGroup/index.html | 2933 ++ .../Admin/DeleteGroupsOptions/index.html | 2890 ++ api/RdKafka/Admin/DeleteRecords/index.html | 2933 ++ .../Admin/DeleteRecordsOptions/index.html | 2890 ++ api/RdKafka/Admin/DeleteTopic/index.html | 2933 ++ .../Admin/DeleteTopicsOptions/index.html | 2890 ++ .../Admin/DescribeConfigsOptions/index.html | 2890 ++ api/RdKafka/Admin/GroupResult/index.html | 3002 ++ api/RdKafka/Admin/NewPartitions/index.html | 2964 ++ api/RdKafka/Admin/NewTopic/index.html | 2995 ++ api/RdKafka/Admin/Options/index.html | 3072 ++ api/RdKafka/Admin/TopicResult/index.html | 2981 ++ api/RdKafka/Conf/index.html | 3277 ++ api/RdKafka/Consumer/index.html | 3027 ++ api/RdKafka/ConsumerTopic/index.html | 3132 ++ api/RdKafka/Event/index.html | 3056 ++ api/RdKafka/Exception/index.html | 2943 ++ api/RdKafka/FFI/CallbackProxy/index.html | 2918 ++ .../FFI/ConsumeCallbackProxy/index.html | 2892 ++ api/RdKafka/FFI/DrMsgCallbackProxy/index.html | 2894 ++ api/RdKafka/FFI/ErrorCallbackProxy/index.html | 2896 ++ api/RdKafka/FFI/Library/index.html | 22509 ++++++++++ api/RdKafka/FFI/LogCallbackProxy/index.html | 2896 ++ api/RdKafka/FFI/Methods/index.html | 22023 +++++++++ .../NativePartitionerCallbackProxy/index.html | 2955 ++ .../FFI/OffsetCommitCallbackProxy/index.html | 2896 ++ api/RdKafka/FFI/OpaqueMap/index.html | 2947 ++ .../FFI/PartitionerCallbackProxy/index.html | 2902 ++ .../FFI/RebalanceCallbackProxy/index.html | 2896 ++ api/RdKafka/FFI/StatsCallbackProxy/index.html | 2898 ++ api/RdKafka/KafkaConsumer/index.html | 3231 ++ api/RdKafka/KafkaConsumerTopic/index.html | 2921 ++ api/RdKafka/KafkaErrorException/index.html | 3027 ++ api/RdKafka/Message/index.html | 3235 ++ api/RdKafka/Metadata/Broker/index.html | 2966 ++ api/RdKafka/Metadata/Collection/index.html | 3033 ++ api/RdKafka/Metadata/Partition/index.html | 3020 ++ api/RdKafka/Metadata/Topic/index.html | 2966 ++ api/RdKafka/Metadata/index.html | 3012 ++ api/RdKafka/Producer/index.html | 3163 ++ api/RdKafka/ProducerTopic/index.html | 2966 ++ api/RdKafka/Queue/index.html | 3018 ++ api/RdKafka/Test/ApiKey/index.html | 3765 ++ api/RdKafka/Test/MockCluster/index.html | 3462 ++ api/RdKafka/Topic/index.html | 2984 ++ api/RdKafka/TopicConf/index.html | 3091 ++ api/RdKafka/TopicPartition/index.html | 3203 ++ api/RdKafka/TopicPartitionList/index.html | 3110 ++ api/RdKafka/index.html | 3197 ++ api/constants/index.html | 37205 ++++++++++++++++ api/functions/index.html | 2993 ++ api/index.html | 3369 ++ assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.e1c3ead8.min.js | 29 + assets/javascripts/bundle.e1c3ead8.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + assets/stylesheets/main.50c56a3b.min.css | 1 + assets/stylesheets/main.50c56a3b.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + benchmarks/index.html | 2965 ++ contributing/contributors/index.html | 2786 ++ contributing/index.html | 2863 ++ contributing/project-overview/index.html | 2904 ++ contributing/run-benchmarks/index.html | 2787 ++ contributing/run-tests/index.html | 2893 ++ .../work-on-the-documentation/index.html | 2768 ++ img/benchmarks-time-average-relative.png | Bin 0 -> 109894 bytes img/benchmarks-time-average.png | Bin 0 -> 104553 bytes img/php-rdkafka.svg | 1 + index.html | 2960 ++ search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes usage/about-ffi-and-librdkafka/index.html | 2848 ++ usage/admin-client/index.html | 3661 ++ usage/alternatives/index.html | 2844 ++ usage/changelog/index.html | 3294 ++ usage/configuration/index.html | 2965 ++ usage/consumer-high-level/index.html | 2918 ++ usage/consumer-low-level/index.html | 3023 ++ usage/examples/index.html | 2900 ++ usage/library-version-handling/index.html | 2858 ++ usage/license/index.html | 2932 ++ usage/mock-cluster/index.html | 3037 ++ usage/preloading/index.html | 2901 ++ usage/producer/index.html | 3007 ++ usage/topic-configuration/index.html | 2853 ++ usage/transactional-producer/index.html | 2759 ++ 135 files changed, 335026 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 api/RdKafka/Admin/AlterConfigsOptions/index.html create mode 100644 api/RdKafka/Admin/Client/index.html create mode 100644 api/RdKafka/Admin/ConfigEntry/index.html create mode 100644 api/RdKafka/Admin/ConfigResource/index.html create mode 100644 api/RdKafka/Admin/ConfigResourceResult/index.html create mode 100644 api/RdKafka/Admin/CreatePartitionsOptions/index.html create mode 100644 api/RdKafka/Admin/CreateTopicsOptions/index.html create mode 100644 api/RdKafka/Admin/DeleteConsumerGroupOffsets/index.html create mode 100644 api/RdKafka/Admin/DeleteConsumerGroupOffsetsOptions/index.html create mode 100644 api/RdKafka/Admin/DeleteGroup/index.html create mode 100644 api/RdKafka/Admin/DeleteGroupsOptions/index.html create mode 100644 api/RdKafka/Admin/DeleteRecords/index.html create mode 100644 api/RdKafka/Admin/DeleteRecordsOptions/index.html create mode 100644 api/RdKafka/Admin/DeleteTopic/index.html create mode 100644 api/RdKafka/Admin/DeleteTopicsOptions/index.html create mode 100644 api/RdKafka/Admin/DescribeConfigsOptions/index.html create mode 100644 api/RdKafka/Admin/GroupResult/index.html create mode 100644 api/RdKafka/Admin/NewPartitions/index.html create mode 100644 api/RdKafka/Admin/NewTopic/index.html create mode 100644 api/RdKafka/Admin/Options/index.html create mode 100644 api/RdKafka/Admin/TopicResult/index.html create mode 100644 api/RdKafka/Conf/index.html create mode 100644 api/RdKafka/Consumer/index.html create mode 100644 api/RdKafka/ConsumerTopic/index.html create mode 100644 api/RdKafka/Event/index.html create mode 100644 api/RdKafka/Exception/index.html create mode 100644 api/RdKafka/FFI/CallbackProxy/index.html create mode 100644 api/RdKafka/FFI/ConsumeCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/DrMsgCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/ErrorCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/Library/index.html create mode 100644 api/RdKafka/FFI/LogCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/Methods/index.html create mode 100644 api/RdKafka/FFI/NativePartitionerCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/OffsetCommitCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/OpaqueMap/index.html create mode 100644 api/RdKafka/FFI/PartitionerCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/RebalanceCallbackProxy/index.html create mode 100644 api/RdKafka/FFI/StatsCallbackProxy/index.html create mode 100644 api/RdKafka/KafkaConsumer/index.html create mode 100644 api/RdKafka/KafkaConsumerTopic/index.html create mode 100644 api/RdKafka/KafkaErrorException/index.html create mode 100644 api/RdKafka/Message/index.html create mode 100644 api/RdKafka/Metadata/Broker/index.html create mode 100644 api/RdKafka/Metadata/Collection/index.html create mode 100644 api/RdKafka/Metadata/Partition/index.html create mode 100644 api/RdKafka/Metadata/Topic/index.html create mode 100644 api/RdKafka/Metadata/index.html create mode 100644 api/RdKafka/Producer/index.html create mode 100644 api/RdKafka/ProducerTopic/index.html create mode 100644 api/RdKafka/Queue/index.html create mode 100644 api/RdKafka/Test/ApiKey/index.html create mode 100644 api/RdKafka/Test/MockCluster/index.html create mode 100644 api/RdKafka/Topic/index.html create mode 100644 api/RdKafka/TopicConf/index.html create mode 100644 api/RdKafka/TopicPartition/index.html create mode 100644 api/RdKafka/TopicPartitionList/index.html create mode 100644 api/RdKafka/index.html create mode 100644 api/constants/index.html create mode 100644 api/functions/index.html create mode 100644 api/index.html create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.e1c3ead8.min.js create mode 100644 assets/javascripts/bundle.e1c3ead8.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 assets/stylesheets/main.50c56a3b.min.css create mode 100644 assets/stylesheets/main.50c56a3b.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 benchmarks/index.html create mode 100644 contributing/contributors/index.html create mode 100644 contributing/index.html create mode 100644 contributing/project-overview/index.html create mode 100644 contributing/run-benchmarks/index.html create mode 100644 contributing/run-tests/index.html create mode 100644 contributing/work-on-the-documentation/index.html create mode 100644 img/benchmarks-time-average-relative.png create mode 100644 img/benchmarks-time-average.png create mode 100644 img/php-rdkafka.svg create mode 100644 index.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 usage/about-ffi-and-librdkafka/index.html create mode 100644 usage/admin-client/index.html create mode 100644 usage/alternatives/index.html create mode 100644 usage/changelog/index.html create mode 100644 usage/configuration/index.html create mode 100644 usage/consumer-high-level/index.html create mode 100644 usage/consumer-low-level/index.html create mode 100644 usage/examples/index.html create mode 100644 usage/library-version-handling/index.html create mode 100644 usage/license/index.html create mode 100644 usage/mock-cluster/index.html create mode 100644 usage/preloading/index.html create mode 100644 usage/producer/index.html create mode 100644 usage/topic-configuration/index.html create mode 100644 usage/transactional-producer/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..ab503d44 --- /dev/null +++ b/404.html @@ -0,0 +1,2715 @@ + + + +
+ + + + + + + + + + + + + + + + +Class \RdKafka\Admin\AlterConfigsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\Client
+public alterConfigs (
+ \RdKafka\Admin\ConfigResource[] $resources,
+ ?\RdKafka\Admin\AlterConfigsOptions $options = null
+ ): \RdKafka\Admin\ConfigResourceResult[]
+
\RdKafka\Admin\ConfigResource[]
?\RdKafka\Admin\AlterConfigsOptions
\RdKafka\Admin\ConfigResourceResult[]
public createPartitions (
+ \RdKafka\Admin\NewPartitions[] $partitions,
+ ?\RdKafka\Admin\CreatePartitionsOptions $options = null
+ ): \RdKafka\Admin\TopicResult[]
+
\RdKafka\Admin\NewPartitions[]
?\RdKafka\Admin\CreatePartitionsOptions
\RdKafka\Admin\TopicResult[]
public createTopics (
+ \RdKafka\Admin\NewTopic[] $topics,
+ ?\RdKafka\Admin\CreateTopicsOptions $options = null
+ ): \RdKafka\Admin\TopicResult[]
+
\RdKafka\Admin\NewTopic[]
?\RdKafka\Admin\CreateTopicsOptions
\RdKafka\Admin\TopicResult[]
public deleteConsumerGroupOffsets (
+ \RdKafka\Admin\DeleteConsumerGroupOffsets $offsets,
+ ?\RdKafka\Admin\DeleteConsumerGroupOffsetsOptions $options = null
+ ): \RdKafka\Admin\GroupResult[]
+
\RdKafka\Admin\DeleteConsumerGroupOffsets
?\RdKafka\Admin\DeleteConsumerGroupOffsetsOptions
\RdKafka\Admin\GroupResult[]
public deleteGroups (
+ \RdKafka\Admin\DeleteGroup[] $groups,
+ ?\RdKafka\Admin\DeleteGroupsOptions $options = null
+ ): \RdKafka\Admin\GroupResult[]
+
\RdKafka\Admin\DeleteGroup[]
?\RdKafka\Admin\DeleteGroupsOptions
\RdKafka\Admin\GroupResult[]
public deleteRecords (
+ \RdKafka\Admin\DeleteRecords[] $records,
+ ?\RdKafka\Admin\DeleteRecordsOptions $options = null
+ ): \RdKafka\TopicPartition[]
+
\RdKafka\Admin\DeleteRecords[]
?\RdKafka\Admin\DeleteRecordsOptions
\RdKafka\TopicPartition[]
public deleteTopics (
+ \RdKafka\Admin\DeleteTopic[] $topics,
+ ?\RdKafka\Admin\DeleteTopicsOptions $options = null
+ ): \RdKafka\Admin\TopicResult[]
+
\RdKafka\Admin\DeleteTopic[]
?\RdKafka\Admin\DeleteTopicsOptions
\RdKafka\Admin\TopicResult[]
public describeConfigs (
+ \RdKafka\Admin\ConfigResource[] $resources,
+ ?\RdKafka\Admin\DescribeConfigsOptions $options = null
+ ): \RdKafka\Admin\ConfigResourceResult[]
+
\RdKafka\Admin\ConfigResource[]
?\RdKafka\Admin\DescribeConfigsOptions
\RdKafka\Admin\ConfigResourceResult[]
public static fromConf (
+ \RdKafka\Conf $conf
+ ): self
+
\RdKafka\Conf
self
public static fromConsumer (
+ \RdKafka\Consumer $consumer
+ ): self
+
\RdKafka\Consumer
self
public static fromProducer (
+ \RdKafka\Producer $producer
+ ): self
+
\RdKafka\Producer
self
public getMetadata (
+ bool $all_topics,
+ ?\RdKafka\Topic $only_topic,
+ int $timeout_ms
+ ): \RdKafka\Metadata
+
bool
?\RdKafka\Topic
int
\RdKafka\Metadata
public newAlterConfigsOptions ( ): \RdKafka\Admin\AlterConfigsOptions
+
\RdKafka\Admin\AlterConfigsOptions
public newCreatePartitionsOptions ( ): \RdKafka\Admin\CreatePartitionsOptions
+
\RdKafka\Admin\CreatePartitionsOptions
public newCreateTopicsOptions ( ): \RdKafka\Admin\CreateTopicsOptions
+
\RdKafka\Admin\CreateTopicsOptions
public newDeleteConsumerGroupOffsetsOptions ( ): \RdKafka\Admin\DeleteConsumerGroupOffsetsOptions
+
\RdKafka\Admin\DeleteConsumerGroupOffsetsOptions
public newDeleteGroupsOptions ( ): \RdKafka\Admin\DeleteGroupsOptions
+
\RdKafka\Admin\DeleteGroupsOptions
public newDeleteRecordsOptions ( ): \RdKafka\Admin\DeleteRecordsOptions
+
\RdKafka\Admin\DeleteRecordsOptions
public newDeleteTopicsOptions ( ): \RdKafka\Admin\DeleteTopicsOptions
+
\RdKafka\Admin\DeleteTopicsOptions
public newDescribeConfigsOptions ( ): \RdKafka\Admin\DescribeConfigsOptions
+
\RdKafka\Admin\DescribeConfigsOptions
public setWaitForResultEventTimeout (
+ int $timeoutMs
+ ): void
+
int
Class \RdKafka\Admin\ConfigEntry
+ public bool isDefault
+
public bool isReadOnly
+
public bool isSensitive
+
public bool isSynonym
+
public string name
+
public int source
+
public \RdKafka\Admin\ConfigEntry[] synonyms
+
public ?string value
+
public __construct (
+ \FFI\CData $entry
+ ):
+
\FFI\CData
Class \RdKafka\Admin\ConfigResource
+public __construct (
+ int $type,
+ string $name
+ ):
+
int
string
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
public setConfig (
+ string $name,
+ string $value
+ ): void
+
string
string
Class \RdKafka\Admin\ConfigResourceResult
+ public \RdKafka\Admin\ConfigEntry[] configs
+
public int error
+
public ?string errorString
+
public string name
+
public int type
+
public __construct (
+ \FFI\CData $result
+ ):
+
\FFI\CData
Class \RdKafka\Admin\CreatePartitionsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\CreateTopicsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\DeleteConsumerGroupOffsets
+public __construct (
+ string $group,
+ \RdKafka\TopicPartition $partitions
+ ):
+
string
\RdKafka\TopicPartition
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
Class \RdKafka\Admin\DeleteConsumerGroupOffsetsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\DeleteGroup
+public __construct (
+ string $name
+ ):
+
string
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
Class \RdKafka\Admin\DeleteGroupsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\DeleteRecords
+public __construct (
+ \RdKafka\TopicPartition $beforeOffsets
+ ):
+
\RdKafka\TopicPartition
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
Class \RdKafka\Admin\DeleteRecordsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\DeleteTopic
+public __construct (
+ string $name
+ ):
+
string
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
Class \RdKafka\Admin\DeleteTopicsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\DescribeConfigsOptions
+public __construct (
+ \RdKafka $kafka
+ ):
+
\RdKafka
Class \RdKafka\Admin\GroupResult
+ public int error
+
public ?string errorString
+
public ?string name
+
public array partitions
+
public __construct (
+ \FFI\CData $result
+ ):
+
\FFI\CData
Class \RdKafka\Admin\NewPartitions
+public __construct (
+ string $topicName,
+ int $new_total_cnt
+ ):
+
string
int
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
public setReplicaAssignment (
+ int $new_partition_id,
+ int[] $broker_ids
+ ): void
+
int
int[]
Class \RdKafka\Admin\NewTopic
+public __construct (
+ string $name,
+ int $num_partitions,
+ int $replication_factor
+ ):
+
string
int
int
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
public setConfig (
+ string $name,
+ string $value
+ ): void
+
string
string
public setReplicaAssignment (
+ int $partition_id,
+ array $broker_ids
+ ): void
+
int
array
abstract Class \RdKafka\Admin\Options
+public __construct (
+ \RdKafka $kafka,
+ int $for_api
+ ):
+
\RdKafka
int
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
public setBrokerId (
+ int $broker_id
+ ): void
+
int
public setOperationTimeout (
+ int $timeout_ms
+ ): void
+
int
public setRequestTimeout (
+ int $timeout_ms
+ ): void
+
int
public setValidateOnly (
+ bool $true_or_false
+ ): void
+
bool
Class \RdKafka\Admin\TopicResult
+ public int error
+
public ?string errorString
+
public string name
+
public __construct (
+ \FFI\CData $result
+ ):
+
\FFI\CData
Class \RdKafka\Conf
+See also
+ +public __construct ( ):
+
public __destruct ( ):
+
public dump ( ): array
+
array
public get (
+ string $name
+ ): string|null
+
string
string|null
public getCData ( ): \FFI\CData
+
\FFI\CData
public set (
+ string $name,
+ string $value
+ ): void
+
Setting non string values like callbacks or default_topic_conf
TopicConf objects is not supported.
For callbacks and default_topic_conf
use corresponding methods directly.
string
string
See also
+ +public setDefaultTopicConf (
+ \RdKafka\TopicConf $topic_conf
+ ): void
+
\RdKafka\TopicConf
Deprecated
+Set custom TopicConf explicitly in Producer::newTopic()
, Consumer::newTopic()
or KafkaConsumer::newTopic()
.
Note: Topic config properties can be also set directly via Conf.
+See also
+ +public setDrMsgCb (
+ callable $callback
+ ): void
+
callable
function(Producer $producer, Message $message, ?mixed $opaque = null)public setErrorCb (
+ callable $callback
+ ): void
+
callable
function($consumerOrProducer, int $err, string $reason, ?mixed $opaque = null)public setLogCb (
+ ?callable $callback
+ ): void
+
?callable
function($consumerOrProducer, int $level, string $facility, string $message) or null to disable loggingpublic setOffsetCommitCb (
+ callable $callback
+ ): void
+
callable
function(KafkaConsumer $consumer, int $err, array $topicPartitions, ?mixed $opaque = null)public setOpaque (
+ mixed $opaque
+ ): void
+
mixed
public setRebalanceCb (
+ callable $callback
+ ): void
+
callable
function(KafkaConsumer $consumer, int $err, array $topicPartitions, ?mixed $opaque = null)public setStatsCb (
+ callable $callback
+ ): void
+
callable
function($consumerOrProducer, string $json, int $jsonLength, ?mixed $opaque = null)Class \RdKafka\Consumer
+public __construct (
+ ?\RdKafka\Conf $conf = null
+ ):
+
?\RdKafka\Conf
public addBrokers (
+ string $broker_list
+ ): int
+
string
int
public getOutQLen ( ): int
+
int
public newQueue ( ): \RdKafka\Queue
+
\RdKafka\Queue
public newTopic (
+ string $topic_name,
+ ?\RdKafka\TopicConf $topic_conf = null
+ ): \RdKafka\ConsumerTopic
+
string
?\RdKafka\TopicConf
\RdKafka\ConsumerTopic
public poll (
+ int $timeout_ms
+ ): int
+
int
int
Class \RdKafka\ConsumerTopic
+public __construct (
+ \RdKafka\Consumer $consumer,
+ string $name,
+ ?\RdKafka\TopicConf $conf = null
+ ):
+
\RdKafka\Consumer
string
?\RdKafka\TopicConf
public __destruct ( ):
+
public consume (
+ int $partition,
+ int $timeout_ms
+ ): ?\RdKafka\Message
+
int
int
?\RdKafka\Message
public consumeBatch (
+ int $partition,
+ int $timeout_ms,
+ int $batch_size
+ ): \RdKafka\Message[]
+
int
int
int
\RdKafka\Message[]
public consumeCallback (
+ int $partition,
+ int $timeout_ms,
+ callable $callback,
+ mixed $opaque = null
+ ): int
+
int
int
callable
mixed
int
Deprecated
+since 1.4.0 librdkafka
+public consumeQueueStart (
+ int $partition,
+ int $offset,
+ \RdKafka\Queue $queue
+ ): void
+
int
int
\RdKafka\Queue
public consumeStart (
+ int $partition,
+ int $offset
+ ): void
+
int
int
public consumeStop (
+ int $partition
+ ): void
+
int
public offsetStore (
+ int $partition,
+ int $offset
+ ): void
+
int
int
Class \RdKafka\Event
+public __construct (
+ \FFI\CData $event
+ ):
+
\FFI\CData
public __destruct ( ):
+
public error ( ): int
+
int
public errorIsFatal ( ): bool
+
bool
public errorString ( ): string
+
string
public getCData ( ): mixed
+
mixed
public name ( ): string
+
string
public type ( ): int
+
int
Class \RdKafka\Exception
+public __construct (
+ mixed $message = '',
+ mixed $code,
+ ?\Throwable $previous = null
+ ):
+
mixed
mixed
?\Throwable
public static fromError (
+ int $code
+ ): self
+
int
self
abstract Class \RdKafka\FFI\CallbackProxy
+public static create (
+ callable $callback
+ ): \Closure
+
callable
\Closure
Class \RdKafka\FFI\ConsumeCallbackProxy
+public __invoke (
+ \FFI\CData $nativeMessage,
+ ?\FFI\CData $opaque = null
+ ): void
+
\FFI\CData
?\FFI\CData
Class \RdKafka\FFI\DrMsgCallbackProxy
+public __invoke (
+ \FFI\CData $producer,
+ \FFI\CData $nativeMessage,
+ ?\FFI\CData $opaque = null
+ ): void
+
\FFI\CData
\FFI\CData
?\FFI\CData
Class \RdKafka\FFI\ErrorCallbackProxy
+public __invoke (
+ \FFI\CData $consumerOrProducer,
+ int $err,
+ string $reason,
+ ?\FFI\CData $opaque = null
+ ): void
+
\FFI\CData
int
string
?\FFI\CData
Class \RdKafka\FFI\Library
+This class is for internal use. It provides access to the low level interface to librdkafka.
+Best practice is to use high level interfaces like \RdKafka\Conf, \RdKafka\Producer, …
+See also
+ +public PHP_LIBRARY_VERSION = '0.6.0'
+
public VERSION_AUTODETECT = ''
+
public VERSION_LATEST = '2.3.0'
+
public static cast (
+ mixed $type,
+ \FFI\CData $ptr
+ ): \FFI\CData
+
mixed
\FFI\CData
\FFI\CData
public static getClientVersion ( ): string
+
The client version exposed to the brokers.
+The version has the format v{phpLibraryVersion}-v{bindingVersion}-librdkafka-v{librdkafkaVersion} - e.g. v0.1.0-dev-v1.5.2-librdkafka-v1.5.2)
+string
public static getFFI ( ): \FFI
+
\FFI
public static getLibrary ( ): string
+
string
public static getLibraryVersion ( ): string
+
The version of librdkafka
+string
public static getVersion ( ): string
+
The version of the current binding with librdkafka
+string
public static hasMethod (
+ string $name
+ ): bool
+
Whether method is supported by current binding version.
+string
bool
public static init (
+ string $version = self::VERSION_AUTODETECT,
+ string $scope = 'RdKafka',
+ ?string $library = null,
+ ?string $cdef = null
+ ): void
+
string
string
?string
?string
public static new (
+ string|\FFI\CData|mixed $type,
+ bool $owned = true,
+ bool $persistent = false
+ ): \FFI\CData
+
string|\FFI\CData|mixed
bool
bool
\FFI\CData
public static preload (
+ string $version = self::VERSION_AUTODETECT,
+ string $scope = 'RdKafka',
+ ?string $library = null,
+ ?string $cdef = null
+ ): \FFI
+
string
string
?string
?string
\FFI
public static rd_kafka_AclBindingFilter_new (
+ int $restype,
+ string|null $name,
+ int $resource_pattern_type,
+ string|null $principal,
+ string|null $host,
+ int $operation,
+ int $permission_type,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new AclBindingFilter object. This object is later passed to rd_kafka_DescribeAcls() or rd_kafka_DeletesAcls() in order to filter the acls to retrieve or to delete. Use the same rd_kafka_AclBinding functions to query or destroy it.
+ +int
rd_kafka_ResourceType_t - The ResourceType or RD_KAFKA_RESOURCE_ANY
if not filtering by this field.string|null
const char* - The resource name or NULL if not filtering by this field.int
rd_kafka_ResourcePatternType_t - The pattern type or RD_KAFKA_RESOURCE_PATTERN_ANY
if not filtering by this field.string|null
const char* - A principal or NULL if not filtering by this field.string|null
const char* - An hostname or ip or NULL if not filtering by this field.int
rd_kafka_AclOperation_t - A Kafka operation or RD_KAFKA_ACL_OPERATION_ANY
if not filtering by this field.int
rd_kafka_AclPermissionType_t - A Kafka permission type or RD_KAFKA_ACL_PERMISSION_TYPE_ANY
if not filtering by this field.\FFI\CData|null
char* - An error string for returning errors or NULL to not use it.int|null
size_t - The errstr
size or 0 to not use it.\FFI\CData|null
rd_kafka_AclBindingFilter_t* - a new allocated AclBindingFilter object, or NULL if the input parameters are invalid. Use rd_kafka_AclBinding_destroy() to free object when done.See also
+ +public static rd_kafka_AclBinding_destroy (
+ \FFI\CData|null $acl_binding
+ ): void
+
\FFI\CData|null
rd_kafka_AclBinding_t*public static rd_kafka_AclBinding_destroy_array (
+ \FFI\CData|null $acl_bindings,
+ int|null $acl_bindings_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_AclBinding_t**int|null
size_tpublic static rd_kafka_AclBinding_error (
+ \FFI\CData|null $acl
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error object for the given acl binding, or NULL on success.See also
+ +public static rd_kafka_AclBinding_host (
+ \FFI\CData|null $acl
+ ): string|null
+
acl
. \FFI\CData|null
const rd_kafka_AclBinding_t* - )string|null
const char* - the host for the given acl binding.See also
+ +public static rd_kafka_AclBinding_name (
+ \FFI\CData|null $acl
+ ): string|null
+
acl
. \FFI\CData|null
const rd_kafka_AclBinding_t* - )string|null
const char* - the resource name for the given acl binding.See also
+ +public static rd_kafka_AclBinding_new (
+ int $restype,
+ string|null $name,
+ int $resource_pattern_type,
+ string|null $principal,
+ string|null $host,
+ int $operation,
+ int $permission_type,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new AclBinding object. This object is later passed to rd_kafka_CreateAcls().
+ +int
rd_kafka_ResourceType_t - The ResourceType.string|null
const char* - The resource name.int
rd_kafka_ResourcePatternType_t - The pattern type.string|null
const char* - A principal, following the kafka specification.string|null
const char* - An hostname or ip.int
rd_kafka_AclOperation_t - A Kafka operation.int
rd_kafka_AclPermissionType_t - A Kafka permission type.\FFI\CData|null
char* - An error string for returning errors or NULL to not use it.int|null
size_t - The errstr
size or 0 to not use it.\FFI\CData|null
rd_kafka_AclBinding_t* - a new allocated AclBinding object, or NULL if the input parameters are invalid. Use rd_kafka_AclBinding_destroy() to free object when done.See also
+ +public static rd_kafka_AclBinding_operation (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_AclOperation_t - the acl operation for the given acl binding.See also
+ +public static rd_kafka_AclBinding_permission_type (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_AclPermissionType_t - the permission type for the given acl binding.See also
+ +public static rd_kafka_AclBinding_principal (
+ \FFI\CData|null $acl
+ ): string|null
+
acl
. \FFI\CData|null
const rd_kafka_AclBinding_t* - )string|null
const char* - the principal for the given acl binding.See also
+ +public static rd_kafka_AclBinding_resource_pattern_type (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_ResourcePatternType_t - the resource pattern type for the given acl binding.See also
+ +public static rd_kafka_AclBinding_restype (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_ResourceType_t - the resource type for the given acl binding.See also
+ +public static rd_kafka_AclOperation_name (
+ int $acl_operation
+ ): string|null
+
int
rd_kafka_AclOperation_t - )string|null
const char* - a string representation of the acl_operation
See also
+ +public static rd_kafka_AclPermissionType_name (
+ int $acl_permission_type
+ ): string|null
+
int
rd_kafka_AclPermissionType_t - )string|null
const char* - a string representation of the acl_permission_type
See also
+ +public static rd_kafka_AdminOptions_destroy (
+ \FFI\CData|null $options
+ ): void
+
\FFI\CData|null
rd_kafka_AdminOptions_t*public static rd_kafka_AdminOptions_new (
+ \FFI\CData|null $rk,
+ int $for_api
+ ): \FFI\CData|null
+
Create a new AdminOptions object.
+The options object is not modified by the Admin API request APIs, + (e.g. CreateTopics) and may be reused for multiple calls. + ++ +
\FFI\CData|null
rd_kafka_t* - Client instance.int
rd_kafka_admin_op_t - Specifies what Admin API this AdminOptions object will be used for, which will enforce what AdminOptions_set_..() calls may be used based on the API, causing unsupported set..() calls to fail. Specifying RD_KAFKA_ADMIN_OP_ANY disables the enforcement allowing any option to be set, even if the option is not used in a future call to an Admin API method.\FFI\CData|null
rd_kafka_AdminOptions_t* - a new AdminOptions object (which must be freed with rd_kafka_AdminOptions_destroy()), or NULL if for_api
was set to an unknown API op type.See also
+ +public static rd_kafka_AdminOptions_set_broker (
+ \FFI\CData|null $options,
+ int|null $broker_id,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Override what broker the Admin request will be sent to.
+By default, Admin requests are sent to the controller broker, with the following exceptions:
+\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin Options.int|null
int32_t - The broker to send the request to.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_include_authorized_operations (
+ \FFI\CData|null $options,
+ int|null $true_or_false
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_AdminOptions_t*int|null
int\FFI\CData|null
rd_kafka_error_t*public static rd_kafka_AdminOptions_set_isolation_level (
+ \FFI\CData|null $options,
+ int $value
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_AdminOptions_t*int
rd_kafka_IsolationLevel_t\FFI\CData|null
rd_kafka_error_t*public static rd_kafka_AdminOptions_set_match_consumer_group_states (
+ \FFI\CData|null $options,
+ \FFI\CData|null $consumer_group_states,
+ int|null $consumer_group_states_cnt
+ ): \FFI\CData|null
+
Set consumer groups states to query for.
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.\FFI\CData|null
const rd_kafka_consumer_group_state_t* - Array of consumer group states.int|null
size_t - Size of the consumer_group_states
array.\FFI\CData|null
rd_kafka_error_t* - NULL on success, a new error instance that must be released with rd_kafka_error_destroy() in case of error.See also
+ +public static rd_kafka_AdminOptions_set_opaque (
+ \FFI\CData|null $options,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
\FFI\CData|null
rd_kafka_AdminOptions_t*\FFI\CData|object|string|null
void*public static rd_kafka_AdminOptions_set_operation_timeout (
+ \FFI\CData|null $options,
+ int|null $timeout_ms,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets the broker's operation timeout, such as the timeout for CreateTopics to complete the creation of topics on the controller before returning a result to the application.
+CreateTopics: values <= 0 will return immediately after triggering topic creation, while > 0 will wait this long for topic creation to propagate in cluster. Default: 60 seconds.
+DeleteTopics: same semantics as CreateTopics. CreatePartitions: same semantics as CreateTopics.
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Timeout in milliseconds.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or RD_KAFKA_RESP_ERR__INVALID_ARG if timeout was out of range in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_request_timeout (
+ \FFI\CData|null $options,
+ int|null $timeout_ms,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets the overall request timeout, including broker lookup, request transmission, operation time on broker, and response.
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Timeout in milliseconds. Defaults to socket.timeout.ms
.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or RD_KAFKA_RESP_ERR__INVALID_ARG if timeout was out of range in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_require_stable_offsets (
+ \FFI\CData|null $options,
+ int|null $true_or_false
+ ): \FFI\CData|null
+
Whether broker should return stable offsets (transaction-committed).
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Defaults to false.\FFI\CData|null
rd_kafka_error_t* - NULL on success, a new error instance that must be released with rd_kafka_error_destroy() in case of error.See also
+ +public static rd_kafka_AdminOptions_set_validate_only (
+ \FFI\CData|null $options,
+ int|null $true_or_false,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Tell broker to only validate the request, without performing the requested operation (create topics, etc).
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Defaults to false.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AlterConfigs (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $configs,
+ int|null $config_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Update the configuration for the specified resources. Updates are not transactional so they may succeed for a subset of the provided resources while the others fail. The configuration for a particular resource is updated atomically, replacing values using the provided ConfigEntrys and reverting unspecified ConfigEntrys to their default values.
+RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_ConfigResource_t**int|null
size_t\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_AlterConfigs_result_resources (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a AlterConfigs result.
+Use rd_kafka_ConfigResource_error()
and rd_kafka_ConfigResource_error_string()
to extract per-resource error results on the returned array elements.
The returned object life-times are the same as the result
object.
\FFI\CData|null
const rd_kafka_AlterConfigs_result_t* - Result object to get resource results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigResource_t** - an array of ConfigResource elements, or NULL if not available.See also
+ +public static rd_kafka_AlterConsumerGroupOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $alter_grpoffsets,
+ int|null $alter_grpoffsets_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Alter committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.
+ +RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t** - Array of group committed offsets to alter. MUST only be one single element.int|null
size_t - Number of elements in alter_grpoffsets
array. MUST always be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_AlterConsumerGroupOffsets_destroy (
+ \FFI\CData|null $alter_grpoffsets
+ ): void
+
\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t*public static rd_kafka_AlterConsumerGroupOffsets_destroy_array (
+ \FFI\CData|null $alter_grpoffsets,
+ int|null $alter_grpoffset_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t**int|null
size_tpublic static rd_kafka_AlterConsumerGroupOffsets_new (
+ string|null $group_id,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Create a new AlterConsumerGroupOffsets object. This object is later passed to rd_kafka_AlterConsumerGroupOffsets().
+ +string|null
const char* - Consumer group id.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - Partitions to alter committed offsets for. Only the topic and partition fields are used.\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t* - a new allocated AlterConsumerGroupOffsets object. Use rd_kafka_AlterConsumerGroupOffsets_destroy() to free object when done.See also
+ +public static rd_kafka_AlterConsumerGroupOffsets_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of results from a AlterConsumerGroupOffsets result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_AlterConsumerGroupOffsets_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_AlterUserScramCredentials (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $alterations,
+ int|null $alteration_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Alter SASL/SCRAM credentials. This operation is supported by brokers with version 2.7.0 or higher.
+\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t** - The alterations to be applied.int|null
size_t - Number of elements in alterations
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_AlterUserScramCredentials_result_response_error (
+ \FFI\CData|null $response
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_response_t*\FFI\CData|null
const rd_kafka_error_t*public static rd_kafka_AlterUserScramCredentials_result_response_user (
+ \FFI\CData|null $response
+ ): string|null
+
\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_response_t*string|null
const char*public static rd_kafka_AlterUserScramCredentials_result_responses (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of responses from a AlterUserScramCredentials result.
+The returned value life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_t* - Result to get responses from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_response_t**See also
+ +public static rd_kafka_ConfigEntry_is_default (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if the config property is set to its default value on the broker, else 0.See also
+ +public static rd_kafka_ConfigEntry_is_read_only (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if the config property is read-only on the broker, else 0.See also
+ +public static rd_kafka_ConfigEntry_is_sensitive (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if the config property contains sensitive information (such as security configuration), else 0.See also
+ +public static rd_kafka_ConfigEntry_is_synonym (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if this entry is a synonym, else 0.See also
+ +public static rd_kafka_ConfigEntry_name (
+ \FFI\CData|null $entry
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )string|null
const char* - the configuration property nameSee also
+ +public static rd_kafka_ConfigEntry_source (
+ \FFI\CData|null $entry
+ ): int
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int
rd_kafka_ConfigSource_t - the config source.See also
+ +public static rd_kafka_ConfigEntry_synonyms (
+ \FFI\CData|null $entry,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
conf
. \FFI\CData|null
const rd_kafka_ConfigEntry_t* - Entry to get synonyms for.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigEntry_t** - the synonym config entry array.See also
+ +public static rd_kafka_ConfigEntry_value (
+ \FFI\CData|null $entry
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )string|null
const char* - the configuration value, may be NULL for sensitive or unset properties.See also
+ +public static rd_kafka_ConfigResource_add_incremental_config (
+ \FFI\CData|null $config,
+ string|null $name,
+ int $op_type,
+ string|null $value
+ ): \FFI\CData|null
+
Add the value of the configuration entry for a subsequent incremental alter config operation. APPEND and SUBTRACT are possible for list-type configuration entries only.
+ +\FFI\CData|null
rd_kafka_ConfigResource_t* - ConfigResource to add config property to.string|null
const char* - Configuration name, depends on resource type.int
rd_kafka_AlterConfigOpType_t - Operation type, one of rd_kafka_AlterConfigOpType_t.string|null
const char* - Configuration value, depends on resource type and name
. Set to NULL
, only with with op_type set to DELETE, to revert configuration value to default.\FFI\CData|null
rd_kafka_error_t* - NULL on success, or an rd_kafka_error_t * with the corresponding error code and string. Error ownership belongs to the caller. Possible error codes:See also
+ +public static rd_kafka_ConfigResource_configs (
+ \FFI\CData|null $config,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of config entries from a ConfigResource object.
+The returned object life-times are the same as the config
object.
\FFI\CData|null
const rd_kafka_ConfigResource_t* - ConfigResource to get configs from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigEntry_t**See also
+ +public static rd_kafka_ConfigResource_destroy (
+ \FFI\CData|null $config
+ ): void
+
\FFI\CData|null
rd_kafka_ConfigResource_t*public static rd_kafka_ConfigResource_destroy_array (
+ \FFI\CData|null $config,
+ int|null $config_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_ConfigResource_t**int|null
size_tpublic static rd_kafka_ConfigResource_error (
+ \FFI\CData|null $config
+ ): int
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )int
rd_kafka_resp_err_t - the error for this resource from an AlterConfigs requestSee also
+ +public static rd_kafka_ConfigResource_error_string (
+ \FFI\CData|null $config
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )string|null
const char* - the error string for this resource from an AlterConfigs request, or NULL if no error.See also
+ +public static rd_kafka_ConfigResource_name (
+ \FFI\CData|null $config
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )string|null
const char* - the name for config
See also
+ +public static rd_kafka_ConfigResource_new (
+ int $restype,
+ string|null $resname
+ ): \FFI\CData|null
+
Create new ConfigResource object.
+ +int
rd_kafka_ResourceType_t - The resource type (e.g., RD_KAFKA_RESOURCE_TOPIC)string|null
const char* - The resource name (e.g., the topic name)\FFI\CData|null
rd_kafka_ConfigResource_t* - a newly allocated objectSee also
+ +public static rd_kafka_ConfigResource_set_config (
+ \FFI\CData|null $config,
+ string|null $name,
+ string|null $value
+ ): int
+
Set configuration name value pair.
+ +This will overwrite the current value.
+ +\FFI\CData|null
rd_kafka_ConfigResource_t* - ConfigResource to set config property on.string|null
const char* - Configuration name, depends on resource type.string|null
const char* - Configuration value, depends on resource type and name
. Set to NULL
to revert configuration value to default.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if config was added to resource, or RD_KAFKA_RESP_ERR__INVALID_ARG on invalid input.See also
+ +public static rd_kafka_ConfigResource_type (
+ \FFI\CData|null $config
+ ): int
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )int
rd_kafka_ResourceType_t - the ResourceType for config
See also
+ +public static rd_kafka_ConfigSource_name (
+ int $confsource
+ ): string|null
+
int
rd_kafka_ConfigSource_t - )string|null
const char* - a string representation of the confsource
.See also
+ +public static rd_kafka_ConsumerGroupDescription_authorized_operations (
+ \FFI\CData|null $grpdesc,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclOperation_t*public static rd_kafka_ConsumerGroupDescription_coordinator (
+ \FFI\CData|null $grpdesc
+ ): \FFI\CData|null
+
Gets the coordinator for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.\FFI\CData|null
const rd_kafka_Node_t* - The group coordinator.See also
+ +public static rd_kafka_ConsumerGroupDescription_error (
+ \FFI\CData|null $grpdesc
+ ): \FFI\CData|null
+
Gets the error for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.\FFI\CData|null
const rd_kafka_error_t* - The group description error.See also
+ +public static rd_kafka_ConsumerGroupDescription_group_id (
+ \FFI\CData|null $grpdesc
+ ): string|null
+
Gets the group id for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.string|null
const char* - The group id.See also
+ +public static rd_kafka_ConsumerGroupDescription_is_simple_consumer_group (
+ \FFI\CData|null $grpdesc
+ ): int|null
+
Is the grpdesc
group a simple consumer group.
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.int|null
int - 1 if the group is a simple consumer group, else 0.See also
+ +public static rd_kafka_ConsumerGroupDescription_member (
+ \FFI\CData|null $grpdesc,
+ int|null $idx
+ ): \FFI\CData|null
+
Gets a member of grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - The group description.int|null
size_t - The member idx.\FFI\CData|null
const rd_kafka_MemberDescription_t* - A member at index idx
, or NULL if idx
is out of range.See also
+ +public static rd_kafka_ConsumerGroupDescription_member_count (
+ \FFI\CData|null $grpdesc
+ ): int|null
+
Gets the members count of grpdesc
group.
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.int|null
size_t - The member count.See also
+ +public static rd_kafka_ConsumerGroupDescription_partition_assignor (
+ \FFI\CData|null $grpdesc
+ ): string|null
+
Gets the partition assignor for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.string|null
const char* - The partition assignor.See also
+ +public static rd_kafka_ConsumerGroupDescription_state (
+ \FFI\CData|null $grpdesc
+ ): int
+
Gets state for the grpdesc
group.
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.int
rd_kafka_consumer_group_state_t - A group state.See also
+ +public static rd_kafka_ConsumerGroupListing_group_id (
+ \FFI\CData|null $grplist
+ ): string|null
+
Gets the group id for the grplist
group.
grplist
object. \FFI\CData|null
const rd_kafka_ConsumerGroupListing_t* - ) - The group listing.string|null
const char* - The group id.See also
+ +public static rd_kafka_ConsumerGroupListing_is_simple_consumer_group (
+ \FFI\CData|null $grplist
+ ): int|null
+
Is the grplist
group a simple consumer group.
\FFI\CData|null
const rd_kafka_ConsumerGroupListing_t* - ) - The group listing.int|null
int - 1 if the group is a simple consumer group, else 0.See also
+ +public static rd_kafka_ConsumerGroupListing_state (
+ \FFI\CData|null $grplist
+ ): int
+
Gets state for the grplist
group.
\FFI\CData|null
const rd_kafka_ConsumerGroupListing_t* - ) - The group listing.int
rd_kafka_consumer_group_state_t - A group state.See also
+ +public static rd_kafka_CreateAcls (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $new_acls,
+ int|null $new_acls_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Create acls as specified by the new_acls
array of size new_topic_cnt
elements.
Supported admin options:
+RD_KAFKA_EVENT_CREATEACLS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AclBinding_t** - Array of new acls to create.int|null
size_t - Number of elements in new_acls
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_CreateAcls_result_acls (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of acl results from a CreateAcls result.
+The returned acl
result life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_CreateAcls_result_t* - CreateAcls result to get acl results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_acl_result_t**See also
+ +public static rd_kafka_CreatePartitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $new_parts,
+ int|null $new_parts_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Create additional partitions for the given topics, as specified by the new_parts
array of size new_parts_cnt
elements.
Supported admin options:
+RD_KAFKA_EVENT_CREATEPARTITIONS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_NewPartitions_t** - Array of topics for which new partitions are to be created.int|null
size_t - Number of elements in new_parts
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_CreatePartitions_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of topic results from a CreatePartitions result.
+The returned topics
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_CreatePartitions_result_t* - Result o get topic results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_topic_result_t**See also
+ +public static rd_kafka_CreateTopics (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $new_topics,
+ int|null $new_topic_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Create topics in cluster as specified by the new_topics
array of size new_topic_cnt
elements.
Supported admin options:
+RD_KAFKA_EVENT_CREATETOPICS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_NewTopic_t** - Array of new topics to create.int|null
size_t - Number of elements in new_topics
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_CreateTopics_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of topic results from a CreateTopics result.
+The returned topics
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_CreateTopics_result_t* - Result to get topics from.\FFI\CData|null
size_t* - Updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_topic_result_t**See also
+ +public static rd_kafka_DeleteAcls (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_acls,
+ int|null $del_acls_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete acls matching the filteres provided in del_acls
array of size del_acls_cnt
.
Supported admin options:
+RD_KAFKA_EVENT_DELETEACLS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AclBindingFilter_t** - Filters for the acls to delete.int|null
size_t - Number of elements in del_acls
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteAcls_result_response_error (
+ \FFI\CData|null $result_response
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DeleteAcls_result_response_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error object for the given DeleteAcls result response, or NULL on success.See also
+ +public static rd_kafka_DeleteAcls_result_response_matching_acls (
+ \FFI\CData|null $result_response,
+ \FFI\CData|null $matching_acls_cntp
+ ): \FFI\CData|null
+
result_response
. \FFI\CData|null
const rd_kafka_DeleteAcls_result_response_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclBinding_t** - the matching acls array for the given DeleteAcls result response.See also
+ +public static rd_kafka_DeleteAcls_result_responses (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of DeleteAcls result responses from a DeleteAcls result.
+The returned responses
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteAcls_result_t* - DeleteAcls result to get responses from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_DeleteAcls_result_response_t**See also
+ +public static rd_kafka_DeleteConsumerGroupOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_grpoffsets,
+ int|null $del_grpoffsets_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.
+ +RD_KAFKA_EVENT_DELETECONSUMERGROUPOFFSETS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t** - Array of group committed offsets to delete. MUST only be one single element.int|null
size_t - Number of elements in del_grpoffsets
array. MUST always be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteConsumerGroupOffsets_destroy (
+ \FFI\CData|null $del_grpoffsets
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t*public static rd_kafka_DeleteConsumerGroupOffsets_destroy_array (
+ \FFI\CData|null $del_grpoffsets,
+ int|null $del_grpoffset_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t**int|null
size_tpublic static rd_kafka_DeleteConsumerGroupOffsets_new (
+ string|null $group,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Create a new DeleteConsumerGroupOffsets object. This object is later passed to rd_kafka_DeleteConsumerGroupOffsets().
+ +string|null
const char* - Consumer group id.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - Partitions to delete committed offsets for. Only the topic and partition fields are used.\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t* - a new allocated DeleteConsumerGroupOffsets object. Use rd_kafka_DeleteConsumerGroupOffsets_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteConsumerGroupOffsets_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of results from a DeleteConsumerGroupOffsets result.
+The returned groups life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteConsumerGroupOffsets_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_DeleteGroup_destroy (
+ \FFI\CData|null $del_group
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteGroup_t*public static rd_kafka_DeleteGroup_destroy_array (
+ \FFI\CData|null $del_groups,
+ int|null $del_group_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteGroup_t**int|null
size_tpublic static rd_kafka_DeleteGroup_new (
+ string|null $group
+ ): \FFI\CData|null
+
Create a new DeleteGroup object. This object is later passed to rd_kafka_DeleteGroups().
+ +string|null
const char* - ) - Name of group to delete.\FFI\CData|null
rd_kafka_DeleteGroup_t* - a new allocated DeleteGroup object. Use rd_kafka_DeleteGroup_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteGroups (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_groups,
+ int|null $del_group_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete groups from cluster as specified by the del_groups
array of size del_group_cnt
elements.
RD_KAFKA_EVENT_DELETEGROUPS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteGroup_t** - Array of groups to delete.int|null
size_t - Number of elements in del_groups
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteGroups_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of group results from a DeleteGroups result.
+The returned groups life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteGroups_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_DeleteRecords (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_records,
+ int|null $del_record_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete records (messages) in topic partitions older than the offsets provided.
+ +Supported admin options:
+rdkafka
will wait for the request to complete.RD_KAFKA_EVENT_DELETERECORDS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteRecords_t** - The offsets to delete (up to). Currently only one DeleteRecords_t (but containing multiple offsets) is supported.int|null
size_t - The number of elements in del_records, must be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteRecords_destroy (
+ \FFI\CData|null $del_records
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteRecords_t*public static rd_kafka_DeleteRecords_destroy_array (
+ \FFI\CData|null $del_records,
+ int|null $del_record_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteRecords_t**int|null
size_tpublic static rd_kafka_DeleteRecords_new (
+ \FFI\CData|null $before_offsets
+ ): \FFI\CData|null
+
Create a new DeleteRecords object. This object is later passed to rd_kafka_DeleteRecords().
+before_offsets
must contain topic
, partition
, and offset
is the offset before which the messages will be deleted (exclusive). Set offset
to RD_KAFKA_OFFSET_END (high-watermark) in order to delete all data in the partition.
\FFI\CData|null
const rd_kafka_topic_partition_list_t* - ) - For each partition delete all messages up to but not including the specified offset.\FFI\CData|null
rd_kafka_DeleteRecords_t* - a new allocated DeleteRecords object. Use rd_kafka_DeleteRecords_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteRecords_result_offsets (
+ \FFI\CData|null $result
+ ): \FFI\CData|null
+
Get a list of topic and partition results from a DeleteRecords result. The returned objects will contain topic
, partition
, offset
and err
. offset
will be set to the post-deletion low-watermark (smallest available offset of all live replicas). err
will be set per-partition if deletion failed.
The returned object's life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteRecords_result_t* - )\FFI\CData|null
const rd_kafka_topic_partition_list_t*See also
+ +public static rd_kafka_DeleteTopic_destroy (
+ \FFI\CData|null $del_topic
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteTopic_t*public static rd_kafka_DeleteTopic_destroy_array (
+ \FFI\CData|null $del_topics,
+ int|null $del_topic_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteTopic_t**int|null
size_tpublic static rd_kafka_DeleteTopic_new (
+ string|null $topic
+ ): \FFI\CData|null
+
Create a new DeleteTopic object. This object is later passed to rd_kafka_DeleteTopics().
+ +string|null
const char* - ) - Topic name to delete.\FFI\CData|null
rd_kafka_DeleteTopic_t* - a new allocated DeleteTopic object. Use rd_kafka_DeleteTopic_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteTopics (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_topics,
+ int|null $del_topic_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete topics from cluster as specified by the topics
array of size topic_cnt
elements.
RD_KAFKA_EVENT_DELETETOPICS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteTopic_t** - Array of topics to delete.int|null
size_t - Number of elements in topics
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteTopics_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of topic results from a DeleteTopics result.
+The returned topics
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteTopics_result_t* - Result to get topic results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_topic_result_t**See also
+ +public static rd_kafka_DescribeAcls (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $acl_filter,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Describe acls matching the filter provided in acl_filter
.
Supported admin options:
+RD_KAFKA_EVENT_DESCRIBEACLS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AclBindingFilter_t* - Filter for the returned acls.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DescribeAcls_result_acls (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a DescribeAcls result.
+DescribeAcls - describe access control lists.
+The returned resources
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DescribeAcls_result_t* - DescribeAcls result to get acls from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_AclBinding_t**See also
+ +public static rd_kafka_DescribeCluster (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*public static rd_kafka_DescribeCluster_result_authorized_operations (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclOperation_t*public static rd_kafka_DescribeCluster_result_cluster_id (
+ \FFI\CData|null $result
+ ): string|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*string|null
const char*public static rd_kafka_DescribeCluster_result_controller (
+ \FFI\CData|null $result
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*\FFI\CData|null
const rd_kafka_Node_t*public static rd_kafka_DescribeCluster_result_nodes (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_Node_t**public static rd_kafka_DescribeConfigs (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $configs,
+ int|null $config_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Get configuration for the specified resources in configs
.
The returned configuration includes default values and the rd_kafka_ConfigEntry_is_default() or rd_kafka_ConfigEntry_source() methods may be used to distinguish them from user supplied values.
+The value of config entries where rd_kafka_ConfigEntry_is_sensitive() is true will always be NULL to avoid disclosing sensitive information, such as security settings.
+Configuration entries where rd_kafka_ConfigEntry_is_read_only() is true can't be updated (with rd_kafka_AlterConfigs()).
+Synonym configuration entries are returned if the broker supports it (broker version >= 1.1.0). See rd_kafka_ConfigEntry_synonyms().
+RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource. \FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_ConfigResource_t**int|null
size_t\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_DescribeConfigs_result_resources (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a DescribeConfigs result.
+The returned resources
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DescribeConfigs_result_t* - Result object to get resource results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigResource_t**See also
+ +public static rd_kafka_DescribeConsumerGroups (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $groups,
+ int|null $groups_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Describe groups from cluster as specified by the groups
array of size groups_cnt
elements.
RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
const char** - Array of groups to describe.int|null
size_t - Number of elements in groups
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DescribeConsumerGroups_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of group results from a DescribeConsumerGroups result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_DescribeConsumerGroups_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t**See also
+ +public static rd_kafka_DescribeTopics (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topics,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_TopicCollection_t*\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*public static rd_kafka_DescribeTopics_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeTopics_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_TopicDescription_t**public static rd_kafka_DescribeUserScramCredentials (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $users,
+ int|null $user_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Describe SASL/SCRAM credentials. This operation is supported by brokers with version 2.7.0 or higher.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
const char** - The users for which credentials are to be described. All users’ credentials are described if NULL.int|null
size_t - Number of elements in users
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DescribeUserScramCredentials_result_descriptions (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of descriptions from a DescribeUserScramCredentials result.
+The returned value life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DescribeUserScramCredentials_result_t* - Result to get descriptions from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t**See also
+ +public static rd_kafka_IncrementalAlterConfigs (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $configs,
+ int|null $config_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Incrementally update the configuration for the specified resources. Updates are not transactional so they may succeed for some resources while fail for others. The configs for a particular resource are updated atomically, executing the corresponding incremental operations on the provided configurations.
+RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource. Broker option will be ignored in this case.\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_ConfigResource_t** - Array of config entries to alter.int|null
size_t - Number of elements in configs
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_IncrementalAlterConfigs_result_resources (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a IncrementalAlterConfigs result.
+Use rd_kafka_ConfigResource_error()
and rd_kafka_ConfigResource_error_string()
to extract per-resource error results on the returned array elements.
The returned object life-times are the same as the result
object.
\FFI\CData|null
const rd_kafka_IncrementalAlterConfigs_result_t* - Result object to get resource results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigResource_t** - an array of ConfigResource elements, or NULL if not available.See also
+ +public static rd_kafka_ListConsumerGroupOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $list_grpoffsets,
+ int|null $list_grpoffsets_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
List committed offsets for a set of partitions in a consumer group.
+ +RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t** - Array of group committed offsets to list. MUST only be one single element.int|null
size_t - Number of elements in list_grpoffsets
array. MUST always be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_ListConsumerGroupOffsets_destroy (
+ \FFI\CData|null $list_grpoffsets
+ ): void
+
\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t*public static rd_kafka_ListConsumerGroupOffsets_destroy_array (
+ \FFI\CData|null $list_grpoffsets,
+ int|null $list_grpoffset_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t**int|null
size_tpublic static rd_kafka_ListConsumerGroupOffsets_new (
+ string|null $group_id,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Create a new ListConsumerGroupOffsets object. This object is later passed to rd_kafka_ListConsumerGroupOffsets().
+ +string|null
const char* - Consumer group id.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - Partitions to list committed offsets for. Only the topic and partition fields are used.\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t* - a new allocated ListConsumerGroupOffsets object. Use rd_kafka_ListConsumerGroupOffsets_destroy() to free object when done.See also
+ +public static rd_kafka_ListConsumerGroupOffsets_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of results from a ListConsumerGroupOffsets result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_ListConsumerGroupOffsets_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_ListConsumerGroups (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
List the consumer groups available in the cluster.
+ +RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_ListConsumerGroups_result_errors (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of errors from a ListConsumerGroups call result.
+The returned errors life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_ListConsumerGroups_result_t* - ListConsumerGroups result.\FFI\CData|null
size_t* - Is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_error_t** - Array of errors in result
.See also
+ +public static rd_kafka_ListConsumerGroups_result_valid (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of valid list groups from a ListConsumerGroups result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_ListConsumerGroups_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConsumerGroupListing_t**See also
+ +public static rd_kafka_ListOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topic_partitions,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*public static rd_kafka_ListOffsetsResultInfo_timestamp (
+ \FFI\CData|null $result_info
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ListOffsetsResultInfo_t*int|null
int64_tpublic static rd_kafka_ListOffsetsResultInfo_topic_partition (
+ \FFI\CData|null $result_info
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_ListOffsetsResultInfo_t*\FFI\CData|null
const rd_kafka_topic_partition_t*public static rd_kafka_ListOffsets_result_infos (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_ListOffsets_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_ListOffsetsResultInfo_t**public static rd_kafka_MemberAssignment_partitions (
+ \FFI\CData|null $assignment
+ ): \FFI\CData|null
+
Gets assigned partitions of a member assignment
.
assignment
object. \FFI\CData|null
const rd_kafka_MemberAssignment_t* - ) - The group member assignment.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - The assigned partitions.See also
+ +public static rd_kafka_MemberDescription_assignment (
+ \FFI\CData|null $member
+ ): \FFI\CData|null
+
Gets assignment of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.\FFI\CData|null
const rd_kafka_MemberAssignment_t* - The member assignment.See also
+ +public static rd_kafka_MemberDescription_client_id (
+ \FFI\CData|null $member
+ ): string|null
+
Gets client id of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The client id.See also
+ +public static rd_kafka_MemberDescription_consumer_id (
+ \FFI\CData|null $member
+ ): string|null
+
Gets consumer id of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The consumer id.See also
+ +public static rd_kafka_MemberDescription_group_instance_id (
+ \FFI\CData|null $member
+ ): string|null
+
Gets group instance id of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The group instance id, or NULL if not available.See also
+ +public static rd_kafka_MemberDescription_host (
+ \FFI\CData|null $member
+ ): string|null
+
Gets host of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The host.See also
+ +public static rd_kafka_NewPartitions_destroy (
+ \FFI\CData|null $new_parts
+ ): void
+
\FFI\CData|null
rd_kafka_NewPartitions_t*public static rd_kafka_NewPartitions_destroy_array (
+ \FFI\CData|null $new_parts,
+ int|null $new_parts_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_NewPartitions_t**int|null
size_tpublic static rd_kafka_NewPartitions_new (
+ string|null $topic,
+ int|null $new_total_cnt,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new NewPartitions. This object is later passed to rd_kafka_CreatePartitions() to increase the number of partitions to new_total_cnt
for an existing topic.
string|null
const char* - Topic name to create more partitions for.int|null
size_t - Increase the topic’s partition count to this value.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_t\FFI\CData|null
rd_kafka_NewPartitions_t* - a new allocated NewPartitions object, or NULL if the input parameters are invalid. Use rd_kafka_NewPartitions_destroy() to free object when done.See also
+ +public static rd_kafka_NewPartitions_set_replica_assignment (
+ \FFI\CData|null $new_parts,
+ int|null $new_partition_idx,
+ \FFI\CData|null $broker_ids,
+ int|null $broker_id_cnt,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set the replica (broker id) assignment for new_partition_idx
to the replica set in broker_ids
(of broker_id_cnt
elements).
new_partition_idx
0 is the first new partition, 1 is the second, and so on.broker_id_cnt
should match the topic's replication factor.\FFI\CData|null
rd_kafka_NewPartitions_t*int|null
int32_t\FFI\CData|null
int32_t*int|null
size_t\FFI\CData|null
char*int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or an error code if the arguments were invalid.See also
+ +public static rd_kafka_NewTopic_destroy (
+ \FFI\CData|null $new_topic
+ ): void
+
\FFI\CData|null
rd_kafka_NewTopic_t*public static rd_kafka_NewTopic_destroy_array (
+ \FFI\CData|null $new_topics,
+ int|null $new_topic_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_NewTopic_t**int|null
size_tpublic static rd_kafka_NewTopic_new (
+ string|null $topic,
+ int|null $num_partitions,
+ int|null $replication_factor,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new NewTopic object. This object is later passed to rd_kafka_CreateTopics().
+ +string|null
const char* - Topic name to create.int|null
int - Number of partitions in topic, or -1 to use the broker’s default partition count (>= 2.4.0).int|null
int - Default replication factor for the topic’s partitions, or -1 to use the broker’s default replication factor (>= 2.4.0) or if set_replica_assignment() will be used.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_t\FFI\CData|null
rd_kafka_NewTopic_t* - a new allocated NewTopic object, or NULL if the input parameters are invalid. Use rd_kafka_NewTopic_destroy() to free object when done.See also
+ +public static rd_kafka_NewTopic_set_config (
+ \FFI\CData|null $new_topic,
+ string|null $name,
+ string|null $value
+ ): int
+
Set (broker-side) topic configuration name/value pair.
+\FFI\CData|null
rd_kafka_NewTopic_t*string|null
const char*string|null
const char*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or an error code if the arguments were invalid.See also
+ +public static rd_kafka_NewTopic_set_replica_assignment (
+ \FFI\CData|null $new_topic,
+ int|null $partition,
+ \FFI\CData|null $broker_ids,
+ int|null $broker_id_cnt,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set the replica (broker) assignment for partition
to the replica set in broker_ids
(of broker_id_cnt
elements).
replication_factor
of -1.\FFI\CData|null
rd_kafka_NewTopic_t*int|null
int32_t\FFI\CData|null
int32_t*int|null
size_t\FFI\CData|null
char*int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or an error code if the arguments were invalid.See also
+ +public static rd_kafka_Node_host (
+ \FFI\CData|null $node
+ ): string|null
+
Get the host of node
.
node
object. \FFI\CData|null
const rd_kafka_Node_t* - ) - The Node instance.string|null
const char* - The node host.See also
+ +public static rd_kafka_Node_id (
+ \FFI\CData|null $node
+ ): int|null
+
Get the id of node
.
\FFI\CData|null
const rd_kafka_Node_t* - ) - The Node instance.int|null
int - The node id.See also
+ +public static rd_kafka_Node_port (
+ \FFI\CData|null $node
+ ): int|null
+
Get the port of node
.
\FFI\CData|null
const rd_kafka_Node_t* - ) - The Node instance.int|null
uint16_t - The node port.See also
+ +public static rd_kafka_Node_rack (
+ \FFI\CData|null $node
+ ): string|null
+
\FFI\CData|null
const rd_kafka_Node_t*string|null
const char*public static rd_kafka_ResourcePatternType_name (
+ int $resource_pattern_type
+ ): string|null
+
int
rd_kafka_ResourcePatternType_t - )string|null
const char* - a string representation of the resource_pattern_type
See also
+ +public static rd_kafka_ResourceType_name (
+ int $restype
+ ): string|null
+
int
rd_kafka_ResourceType_t - )string|null
const char* - a string representation of the restype
See also
+ +public static rd_kafka_ScramCredentialInfo_iterations (
+ \FFI\CData|null $scram_credential_info
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ScramCredentialInfo_t*int|null
int32_tpublic static rd_kafka_ScramCredentialInfo_mechanism (
+ \FFI\CData|null $scram_credential_info
+ ): int
+
\FFI\CData|null
const rd_kafka_ScramCredentialInfo_t*int
rd_kafka_ScramMechanism_tpublic static rd_kafka_TopicCollection_destroy (
+ \FFI\CData|null $topics
+ ): void
+
\FFI\CData|null
rd_kafka_TopicCollection_t*public static rd_kafka_TopicCollection_of_topic_names (
+ \FFI\CData|null $topics,
+ int|null $topics_cnt
+ ): \FFI\CData|null
+
\FFI\CData|null
const char**int|null
size_t\FFI\CData|null
rd_kafka_TopicCollection_t*public static rd_kafka_TopicDescription_authorized_operations (
+ \FFI\CData|null $topicdesc,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclOperation_t*public static rd_kafka_TopicDescription_error (
+ \FFI\CData|null $topicdesc
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
const rd_kafka_error_t*public static rd_kafka_TopicDescription_is_internal (
+ \FFI\CData|null $topicdesc
+ ): int|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*int|null
intpublic static rd_kafka_TopicDescription_name (
+ \FFI\CData|null $topicdesc
+ ): string|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*string|null
const char*public static rd_kafka_TopicDescription_partitions (
+ \FFI\CData|null $topicdesc,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t**public static rd_kafka_TopicDescription_topic_id (
+ \FFI\CData|null $topicdesc
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
const rd_kafka_Uuid_t*public static rd_kafka_TopicPartitionInfo_isr (
+ \FFI\CData|null $partition,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_Node_t**public static rd_kafka_TopicPartitionInfo_leader (
+ \FFI\CData|null $partition
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*\FFI\CData|null
const rd_kafka_Node_t*public static rd_kafka_TopicPartitionInfo_partition (
+ \FFI\CData|null $partition
+ ): int|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*int|null
const intpublic static rd_kafka_TopicPartitionInfo_replicas (
+ \FFI\CData|null $partition,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_Node_t**public static rd_kafka_UserScramCredentialAlteration_destroy (
+ \FFI\CData|null $alteration
+ ): void
+
\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t*public static rd_kafka_UserScramCredentialAlteration_destroy_array (
+ \FFI\CData|null $alterations,
+ int|null $alteration_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t**int|null
size_tpublic static rd_kafka_UserScramCredentialDeletion_new (
+ string|null $username,
+ int $mechanism
+ ): \FFI\CData|null
+
Allocates a new UserScramCredentialDeletion given its fields.
+ +string|null
const char* - The username (not empty).int
rd_kafka_ScramMechanism_t - SASL/SCRAM mechanism.\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t* - A newly created instance of rd_kafka_UserScramCredentialAlteration_t. Ownership belongs to the caller, use rd_kafka_UserScramCredentialAlteration_destroy to destroy.See also
+ +public static rd_kafka_UserScramCredentialUpsertion_new (
+ string|null $username,
+ int $mechanism,
+ int|null $iterations,
+ \FFI\CData|null $password,
+ int|null $password_size,
+ \FFI\CData|null $salt,
+ int|null $salt_size
+ ): \FFI\CData|null
+
Allocates a new UserScramCredentialUpsertion given its fields. If salt isn't given a 64 B salt is generated using OpenSSL RAND_priv_bytes, if available.
+ +string|null
const char* - The username (not empty).int
rd_kafka_ScramMechanism_t - SASL/SCRAM mechanism.int|null
int32_t - SASL/SCRAM iterations.\FFI\CData|null
const unsigned char* - Password bytes (not empty).int|null
size_t - Size of password
(greater than 0).\FFI\CData|null
const unsigned char* - Salt bytes (optional).int|null
size_t - Size of salt
(optional).\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t* - A newly created instance of rd_kafka_UserScramCredentialAlteration_t. Ownership belongs to the caller, use rd_kafka_UserScramCredentialAlteration_destroy to destroy.See also
+ +public static rd_kafka_UserScramCredentialsDescription_error (
+ \FFI\CData|null $description
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*\FFI\CData|null
const rd_kafka_error_t*public static rd_kafka_UserScramCredentialsDescription_scramcredentialinfo (
+ \FFI\CData|null $description,
+ int|null $idx
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*int|null
size_t\FFI\CData|null
const rd_kafka_ScramCredentialInfo_t*public static rd_kafka_UserScramCredentialsDescription_scramcredentialinfo_count (
+ \FFI\CData|null $description
+ ): int|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*int|null
size_tpublic static rd_kafka_UserScramCredentialsDescription_user (
+ \FFI\CData|null $description
+ ): string|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*string|null
const char*public static rd_kafka_Uuid_base64str (
+ \FFI\CData|null $uuid
+ ): string|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*string|null
const char*public static rd_kafka_Uuid_copy (
+ \FFI\CData|null $uuid
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*\FFI\CData|null
rd_kafka_Uuid_t*public static rd_kafka_Uuid_destroy (
+ \FFI\CData|null $uuid
+ ): void
+
\FFI\CData|null
rd_kafka_Uuid_t*public static rd_kafka_Uuid_least_significant_bits (
+ \FFI\CData|null $uuid
+ ): int|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*int|null
int64_tpublic static rd_kafka_Uuid_most_significant_bits (
+ \FFI\CData|null $uuid
+ ): int|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*int|null
int64_tpublic static rd_kafka_Uuid_new (
+ int|null $most_significant_bits,
+ int|null $least_significant_bits
+ ): \FFI\CData|null
+
int|null
int64_tint|null
int64_t\FFI\CData|null
rd_kafka_Uuid_t*public static rd_kafka_abort_transaction (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Aborts the ongoing transaction.
+This function should also be used to recover from non-fatal abortable + transaction errors. + +Any outstanding messages will be purged and fail with + RD_KAFKA_RESP_ERR__PURGE_INFLIGHT or RD_KAFKA_RESP_ERR__PURGE_QUEUE. + See rd_kafka_purge() for details. ++
timeout_ms
. Using other values risk internal state desynchronization in case any of the underlying protocol requests fail.timeout_ms
expires, which ever comes first. On timeout the application may call the function again. If the application has enabled RD_KAFKA_EVENT_DR it must serve the event queue in a separate thread since rd_kafka_flush() will not serve delivery reports in this mode.\FFI\CData|null
rd_kafka_t* - Producer instance.int|null
int - The maximum time to block. On timeout the operation may continue in the background, depending on state, and it is okay to call this function again. Pass -1 to use the remaining transaction timeout, this is the recommended use.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether a fatal error has been raised by calling rd_kafka_error_is_fatal(). Error codes: RD_KAFKA_RESP_ERR__STATE if not currently in a transaction, RD_KAFKA_RESP_ERR__TIMED_OUT if the transaction could not be complete commmitted within timeout_ms
, this is a retriable error as the commit continues in the background, RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH if the current producer transaction has been fenced by a newer producer instance, RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED if the producer is no longer authorized to perform transactional operations, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_acl_result_error (
+ \FFI\CData|null $aclres
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_acl_result_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error object for the given acl result, or NULL on success.See also
+ +public static rd_kafka_assign (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Atomic assignment of partitions to consume.
+The new partitions
will replace the existing assignment.
A zero-length partitions
will treat the partitions as a valid, albeit empty assignment, and maintain internal state, while a NULL
value for partitions
will reset and clear the internal state.
When used from a rebalance callback, the application should pass the partition list passed to the callback (or a copy of it) even if the list is empty (i.e. should not pass NULL in this case) so as to maintain internal join state. This is not strictly required - the application may adjust the assignment provided by the group. However, this is rarely useful in practice.
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - An error code indicating if the new assignment was applied or not. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.See also
+ +public static rd_kafka_assignment (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Returns the current partition assignment as set by rd_kafka_assign() or rd_kafka_incremental_assign().
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t**int
rd_kafka_resp_err_t - An error code on failure, otherwise partitions
is updated to point to a newly allocated partition list (possibly empty).See also
+ +public static rd_kafka_assignment_lost (
+ \FFI\CData|null $rk
+ ): int|null
+
Check whether the consumer considers the current assignment to have been lost involuntarily. This method is only applicable for use with a high level subscribing consumer. Assignments are revoked immediately when determined to have been lost, so this method is only useful when reacting to a RD_KAFKA_EVENT_REBALANCE event or from within a rebalance_cb. Partitions that have been lost may already be owned by other members in the group and therefore commiting offsets, for example, may fail.
+\FFI\CData|null
rd_kafka_t* - )int|null
int - Returns 1 if the current partition assignment is considered lost, 0 otherwise.See also
+ +public static rd_kafka_begin_transaction (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Begin a new transaction.
+rd_kafka_init_transactions() must have been called successfully (once) before this function is called.
+Upon successful return from this function the application has to perform at least one of the following operations within transaction.timeout.ms
to avoid timing out the transaction on the broker:
Any messages produced, offsets sent (rd_kafka_send_offsets_to_transaction()), etc, after the successful return of this function will be part of the transaction and committed or aborted atomatically.
+Finish the transaction by calling rd_kafka_commit_transaction() or abort the transaction by calling rd_kafka_abort_transaction().
+ +\FFI\CData|null
rd_kafka_t* - ) - Producer instance.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether a fatal error has been raised by calling rd_kafka_error_is_fatal(). Error codes: RD_KAFKA_RESP_ERR__STATE if a transaction is already in progress or upon fatal error, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance. Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_brokers_add (
+ \FFI\CData|null $rk,
+ string|null $brokerlist
+ ): int|null
+
Adds one or more brokers to the kafka handle's list of initial bootstrap brokers.
+Additional brokers will be discovered automatically as soon as rdkafka connects to a broker by querying the broker metadata.
+If a broker name resolves to multiple addresses (and possibly address families) all will be used for connection attempts in round-robin fashion.
+brokerlist
is a ,-separated list of brokers in the format: <broker1>
,<broker2>,.. Where each broker is in either the host or URL based format: <host>
[:<port>] <proto>
://<host>[:port] <proto>
is either PLAINTEXT
, SSL
, SASL
, SASL_PLAINTEXT
The two formats can be mixed but ultimately the value of the security.protocol
config property decides what brokers are allowed.
Example: brokerlist = "broker1:10000,broker2" brokerlist = "SSL://broker3:9000,ssl://broker2"
+ +metadata.broker.list
or bootstrap.servers
configuration property (preferred method).bootstrap.servers
configuration property. \FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int - the number of brokers successfully added.See also
+ +public static rd_kafka_clusterid (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Returns the ClusterId as reported in broker metadata.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.int|null
int - If there is no cached value from metadata retrieval then this specifies the maximum amount of time (in milliseconds) the call will block waiting for metadata to be retrieved. Use 0 for non-blocking calls.\FFI\CData|null
char* - a newly allocated string containing the ClusterId, or NULL if no ClusterId could be retrieved in the allotted timespan.See also
+ +public static rd_kafka_commit (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ int|null $async
+ ): int
+
Commit offsets on broker for the provided list of partitions.
+offsets
should contain topic
, partition
, offset
and possibly metadata
. The offset
should be the offset where consumption will resume, i.e., the last processed offset + 1. If offsets
is NULL the current partition assignment will be used instead.
If async
is false this operation will block until the broker offset commit is done, returning the resulting success or error code.
If a rd_kafka_conf_set_offset_commit_cb() offset commit callback has been configured the callback will be enqueued for a future call to rd_kafka_poll(), rd_kafka_consumer_poll() or similar.
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*int|null
intint
rd_kafka_resp_err_t - An error code indiciating if the commit was successful, or successfully scheduled if asynchronous, or failed. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.See also
+ +public static rd_kafka_commit_message (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ int|null $async
+ ): int
+
Commit message's offset on broker for the message's partition. The committed offset is the message's offset + 1.
+\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_message_t*int|null
intint
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_commit_queue (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ \FFI\CData|null $rkqu,
+ \FFI\CData|\Closure $cb,
+ \FFI\CData|object|string|null $opaque
+ ): int
+
Commit offsets on broker for the provided list of partitions.
+See rd_kafka_commit for offsets
semantics.
The result of the offset commit will be posted on the provided rkqu
queue.
If the application uses one of the poll APIs (rd_kafka_poll(), rd_kafka_consumer_poll(), rd_kafka_queue_poll(), ..) to serve the queue the cb
callback is required.
The commit_opaque
argument is passed to the callback as commit_opaque
, or if using the event API the callback is ignored and the offset commit result will be returned as an RD_KAFKA_EVENT_COMMIT event and the commit_opaque
value will be available with rd_kafka_event_opaque().
If rkqu
is NULL a temporary queue will be created and the callback will be served by this call.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*\FFI\CData|null
rd_kafka_queue_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_resp_err_t, rd_kafka_topic_partition_list_t*, void*)\FFI\CData|object|string|null
void*int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_commit_transaction (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Commit the current transaction (as started with rd_kafka_begin_transaction()).
+Any outstanding messages will be flushed (delivered) before actually committing the transaction.
+If any of the outstanding messages fail permanently the current transaction will enter the abortable error state and this function will return an abortable error, in this case the application must call rd_kafka_abort_transaction() before attempting a new transaction with rd_kafka_begin_transaction().
+ +timeout_ms
. Using other values risk internal state desynchronization in case any of the underlying protocol requests fail.timeout_ms
expires, which ever comes first. On timeout the application may call the function again.\FFI\CData|null
rd_kafka_t* - Producer instance.int|null
int - The maximum time to block. On timeout the operation may continue in the background, depending on state, and it is okay to call this function again. Pass -1 to use the remaining transaction timeout, this is the recommended use.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether an abortable or fatal error has been raised by calling rd_kafka_error_txn_requires_abort() or rd_kafka_error_is_fatal() respectively. Error codes: RD_KAFKA_RESP_ERR__STATE if not currently in a transaction, RD_KAFKA_RESP_ERR__TIMED_OUT if the transaction could not be complete commmitted within timeout_ms
, this is a retriable error as the commit continues in the background, RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH if the current producer transaction has been fenced by a newer producer instance, RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED if the producer is no longer authorized to perform transactional operations, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_committed (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions,
+ int|null $timeout_ms
+ ): int
+
Retrieve committed offsets for topics+partitions.
+The offset
field of each requested partition will either be set to stored offset or to RD_KAFKA_OFFSET_INVALID in case there was no stored offset for that partition.
Committed offsets will be returned according to the isolation.level
configuration property, if set to read_committed
(default) then only stable offsets for fully committed transactions will be returned, while read_uncommitted
may return offsets for not yet committed transactions.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success in which case the offset
or err
field of each partitions’
element is filled in with the stored offset, or a partition specific error. Else returns an error code.See also
+ +public static rd_kafka_conf (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
const rd_kafka_conf_t* - the configuration object used by an rd_kafka_t instance. For use with rd_kafka_conf_get(), et.al., to extract configuration properties from a running client.See also
+ +public static rd_kafka_conf_destroy (
+ \FFI\CData|null $conf
+ ): void
+
\FFI\CData|null
rd_kafka_conf_t*public static rd_kafka_conf_dump (
+ \FFI\CData|null $conf,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Dump the configuration properties and values of conf
to an array with "key", "value" pairs.
The number of entries in the array is returned in *cntp
.
The dump must be freed with rd_kafka_conf_dump_free()
.
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|null
size_t*\FFI\CData|null
const char**See also
+ +public static rd_kafka_conf_dump_free (
+ \FFI\CData|null $arr,
+ int|null $cnt
+ ): void
+
\FFI\CData|null
const char**int|null
size_tpublic static rd_kafka_conf_dup (
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
Creates a copy/duplicate of configuration object conf
.
\FFI\CData|null
const rd_kafka_conf_t* - )\FFI\CData|null
rd_kafka_conf_t*See also
+ +public static rd_kafka_conf_dup_filter (
+ \FFI\CData|null $conf,
+ int|null $filter_cnt,
+ \FFI\CData|null $filter
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_conf_t*int|null
size_t\FFI\CData|null
const char**\FFI\CData|null
rd_kafka_conf_t*public static rd_kafka_conf_enable_sasl_queue (
+ \FFI\CData|null $conf,
+ int|null $enable
+ ): void
+
Enable/disable creation of a queue specific to SASL events and callbacks.
+For SASL mechanisms that trigger callbacks (currently OAUTHBEARER) this configuration API allows an application to get a dedicated queue for the SASL events/callbacks. After enabling the queue with this API the application can retrieve the queue by calling rd_kafka_queue_get_sasl() on the client instance. This queue may then be served directly by the application (with rd_kafka_queue_poll(), et.al) or forwarded to another queue, such as the background queue.
+A convenience function is available to automatically forward the SASL queue to librdkafka's background thread, see rd_kafka_sasl_background_callbacks_enable().
+By default (enable
= 0) the main queue (as served by rd_kafka_poll(), et.al.) is used for SASL callbacks.
\FFI\CData|null
rd_kafka_conf_t*int|null
intSee also
+ +public static rd_kafka_conf_get (
+ \FFI\CData|null $conf,
+ string|null $name,
+ \FFI\CData|null $dest,
+ \FFI\CData|null $dest_size
+ ): int
+
Retrieve configuration value for property name
.
If dest
is non-NULL the value will be written to dest
with at most dest_size
.
*dest_size
is updated to the full length of the value, thus if *dest_size
initially is smaller than the full length the application may reallocate dest
to fit the returned *dest_size
and try again.
If dest
is NULL only the full length of the value is returned.
Fallthrough: Topic-level configuration properties from the default_topic_conf
may be retrieved using this interface.
\FFI\CData|null
const rd_kafka_conf_t*string|null
const char*\FFI\CData|null
char*\FFI\CData|null
size_t*int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK
if the property name matched, else RD_KAFKA_CONF_UNKNOWN
.See also
+ +public static rd_kafka_conf_get_default_topic_conf (
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
Gets the default topic configuration as previously set with rd_kafka_conf_set_default_topic_conf() or that was implicitly created by configuring a topic-level property on the global conf
object.
conf
object. It may be modified but not destroyed and its lifetime is the same as the conf
object or the next call to rd_kafka_conf_set_default_topic_conf(). \FFI\CData|null
rd_kafka_conf_t* - )\FFI\CData|null
rd_kafka_topic_conf_t* - the conf’s
default topic configuration (if any), or NULL.See also
+ +public static rd_kafka_conf_interceptor_add_on_conf_destroy (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_conf_destroy,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_conf_destroy() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_conf_destroy_t*)(void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_conf_interceptor_add_on_conf_dup (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_conf_dup,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_conf_dup() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_conf_dup_t*)(rd_kafka_conf_t*, const rd_kafka_conf_t*, size_t, const char**, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_conf_interceptor_add_on_conf_set (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_conf_set,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_conf_set() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_conf_res_t(rd_kafka_interceptor_f_on_conf_set_t*)(rd_kafka_conf_t*, const char*, const char*, char*, size_t, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_conf_interceptor_add_on_new (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_new,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_new() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_new_t*)(rd_kafka_t*, const rd_kafka_conf_t*, void*, char*, size_t) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_conf_new ( ): \FFI\CData|null
+
Create configuration object.
+When providing your own configuration to the rd_kafka_*_new_*
() calls the rd_kafka_conf_t objects needs to be created with this function which will set up the defaults. I.e.:
rd_kafka_conf_t *myconf;
+rd_kafka_conf_res_t res;
+
+myconf = rd_kafka_conf_new();
+res = rd_kafka_conf_set(myconf, "socket.timeout.ms", "600",
+ errstr, sizeof(errstr));
+if (res != RD_KAFKA_CONF_OK)
+ die("%s\n", errstr);
+
+rk = rd_kafka_new(..., myconf);
Please see CONFIGURATION.md for the default settings or use rd_kafka_conf_properties_show() to provide the information at runtime.
+The properties are identical to the Apache Kafka configuration properties whenever possible.
+\FFI\CData|null
rd_kafka_conf_t* - ) - A new rd_kafka_conf_t object with defaults set.See also
+ +public static rd_kafka_conf_properties_show (
+ \FFI\CData|null $fp
+ ): void
+
Prints a table to fp
of all supported configuration properties, their default values as well as a description.
\FFI\CData|null
FILE* - )See also
+ +public static rd_kafka_conf_set (
+ \FFI\CData|null $conf,
+ string|null $name,
+ string|null $value,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets a configuration property.
+conf
must have been previously created with rd_kafka_conf_new().
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 subsequent rd_kafka_conf_set_default_topic_conf() calls will replace the current default topic configuration.
\FFI\CData|null
rd_kafka_conf_t*string|null
const char*string|null
const char*\FFI\CData|null
char*int|null
size_tint
rd_kafka_conf_res_t - rd_kafka_conf_res_t
to indicate success or failure. In case of failure errstr
is updated to contain a human readable error string.See also
+ +public static rd_kafka_conf_set_background_event_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $event_cb
+ ): void
+
Generic event callback to be used with the event API to trigger callbacks for rd_kafka_event_t
objects from a background thread serving the background queue.
How to use:
+The application must destroy the rkev
passed to event
cb using rd_kafka_event_destroy().
The event_cb
opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
event_cb
will be called spontaneously from a background thread completely managed by librdkafka. Take care to perform proper locking of application objects.\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_event_t*, void*)See also
+ +public static rd_kafka_conf_set_closesocket_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $closesocket_cb
+ ): void
+
Set close socket callback.
+Close a socket (optionally opened with socket_cb()).
+The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(int, void)See also
+ +public static rd_kafka_conf_set_connect_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $connect_cb
+ ): void
+
Set connect callback.
+The connect callback is responsible for connecting socket sockfd
to peer address addr
. The id
field contains the broker identifier.
connect_cb
shall return 0 on success (socket connected) or an error number (errno) on error.
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(int, const struct sockaddr, int, const char*, void*)See also
+ +public static rd_kafka_conf_set_consume_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $consume_cb
+ ): void
+
Consumer: Set consume callback for use with rd_kafka_consumer_poll()
+The consume_cb
opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_message_t, void*)See also
+ +public static rd_kafka_conf_set_default_topic_conf (
+ \FFI\CData|null $conf,
+ \FFI\CData|null $tconf
+ ): void
+
Sets the default topic configuration to use for automatically subscribed topics (e.g., through pattern-matched topics). The topic config object is not usable after this call.
+\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|null
rd_kafka_topic_conf_t*See also
+ +public static rd_kafka_conf_set_dr_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $dr_cb
+ ): void
+
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, void*, size_t, rd_kafka_resp_err_t, void*, void*)See also
+ +public static rd_kafka_conf_set_dr_msg_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $dr_msg_cb
+ ): void
+
Producer: Set delivery report callback in provided conf
object.
The delivery report callback will be called once for each message accepted by rd_kafka_produce() (et.al) with err
set to indicate the result of the produce request.
The callback is called when a message is succesfully produced or if librdkafka encountered a permanent failure. Delivery errors occur when the retry count is exceeded, when the message.timeout.ms timeout is exceeded or there is a permanent error like RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART.
+An application must call rd_kafka_poll() at regular intervals to serve queued delivery report callbacks.
+The broker-assigned offset can be retrieved with rkmessage->offset
and the timestamp can be retrieved using rd_kafka_message_timestamp().
The dr_msg_cb
opaque
argument is the opaque set with rd_kafka_conf_set_opaque(). The per-message msg_opaque value is available in rd_kafka_message_t._private
.
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, const rd_kafka_message_t*, void*)See also
+ +public static rd_kafka_conf_set_engine_callback_data (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $callback_data
+ ): void
+
Set callback_data for OpenSSL engine.
+ +ssl.engine.location
configuration must be set for this to have affect.value
must remain valid for the lifetime of the configuration object and any Kafka clients that use it. \FFI\CData|null
rd_kafka_conf_t* - Configuration object.\FFI\CData|object|string|null
void* - passed to engine callbacks, e.g. ENGINE_load_ssl_client_cert
.See also
+ +public static rd_kafka_conf_set_error_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $error_cb
+ ): void
+
Set error callback in provided conf object.
+The error callback is used by librdkafka to signal warnings and errors back to the application.
+These errors should generally be considered informational and non-permanent, the client will try to recover automatically from all type of errors. Given that the client and cluster configuration is correct the application should treat these as temporary errors.
+error_cb
will be triggered with err
set to RD_KAFKA_RESP_ERR__FATAL if a fatal error has been raised; in this case use rd_kafka_fatal_error() to retrieve the fatal error code and error string, and then begin terminating the client instance.
If no error_cb
is registered, or RD_KAFKA_EVENT_ERROR has not been set with rd_kafka_conf_set_events, then the errors will be logged instead.
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, int, const char*, void*)See also
+ +public static rd_kafka_conf_set_events (
+ \FFI\CData|null $conf,
+ int|null $events
+ ): void
+
\FFI\CData|null
rd_kafka_conf_t*int|null
intpublic static rd_kafka_conf_set_log_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $log_cb
+ ): void
+
Set logger callback.
+The default is to print to stderr, but a syslog logger is also available, see rd_kafka_log_print and rd_kafka_log_syslog for the builtin alternatives. Alternatively the application may provide its own logger callback. Or pass func
as NULL to disable logging.
This is the configuration alternative to the deprecated rd_kafka_set_logger()
+rd_kafka_set_log_queue()
. An application MUST NOT call any librdkafka APIs or do any prolonged work in a non-forwarded log_cb
. \FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(const rd_kafka_t, int, const char*, const char*)See also
+ +public static rd_kafka_conf_set_oauthbearer_token_refresh_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $oauthbearer_token_refresh_cb
+ ): void
+
Set SASL/OAUTHBEARER token refresh callback in provided conf object.
+ +The SASL/OAUTHBEARER token refresh callback is triggered via rd_kafka_poll() whenever OAUTHBEARER is the SASL mechanism and a token needs to be retrieved, typically based on the configuration defined in sasl.oauthbearer.config
.
The callback should invoke rd_kafka_oauthbearer_set_token() or rd_kafka_oauthbearer_set_token_failure() to indicate success or failure, respectively.
+The refresh operation is eventable and may be received via rd_kafka_queue_poll() with an event type of RD_KAFKA_EVENT_OAUTHBEARER_TOKEN_REFRESH
.
Note that before any SASL/OAUTHBEARER broker connection can succeed the application must call rd_kafka_oauthbearer_set_token() once – either directly or, more typically, by invoking either rd_kafka_poll(), rd_kafka_consumer_poll(), rd_kafka_queue_poll(), etc, in order to cause retrieval of an initial token to occur.
+Alternatively, the application can enable the SASL queue by calling rd_kafka_conf_enable_sasl_queue() on the configuration object prior to creating the client instance, get the SASL queue with rd_kafka_queue_get_sasl(), and either serve the queue manually by calling rd_kafka_queue_poll(), or redirecting the queue to the background thread to have the queue served automatically. For the latter case the SASL queue must be forwarded to the background queue with rd_kafka_queue_forward(). A convenience function is available to automatically forward the SASL queue to librdkafka's background thread, see rd_kafka_sasl_background_callbacks_enable().
+An unsecured JWT refresh handler is provided by librdkafka for development and testing purposes, it is enabled by setting the enable.sasl.oauthbearer.unsecure.jwt
property to true and is mutually exclusive to using a refresh callback.
\FFI\CData|null
rd_kafka_conf_t* - the configuration to mutate.\FFI\CData|\Closure
void()(rd_kafka_t, const char*, void*) - the callback to set; callback function arguments:rk
- Kafka handleoauthbearer_config
- Value of configuration property sasl.oauthbearer.config. opaque
- Application-provided opaque set via rd_kafka_conf_set_opaque()See also
+ +public static rd_kafka_conf_set_offset_commit_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $offset_commit_cb
+ ): void
+
Consumer: Set offset commit callback for use with consumer groups.
+The results of automatic or manual offset commits will be scheduled for this callback and is served by rd_kafka_consumer_poll().
+If no partitions had valid offsets to commit this callback will be called with err
== RD_KAFKA_RESP_ERR__NO_OFFSET which is not to be considered an error.
The offsets
list contains per-partition information:
offset:
committed offset (attempted)err:
commit errorThe callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_resp_err_t, rd_kafka_topic_partition_list_t*, void*)See also
+ +public static rd_kafka_conf_set_opaque (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Sets the application's opaque pointer that will be passed to callbacks.
+\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_conf_set_rebalance_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $rebalance_cb
+ ): void
+
Consumer: Set rebalance callback for use with coordinated consumer group balancing.
+The err
field is set to either RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS or RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS and 'partitions' contains the full partition set that was either assigned or revoked.
Registering a rebalance_cb
turns off librdkafka's automatic partition assignment/revocation and instead delegates that responsibility to the application's rebalance_cb
.
The rebalance callback is responsible for updating librdkafka's assignment set based on the two events: RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS and RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS but should also be able to handle arbitrary rebalancing failures where err
is neither of those.
For eager/non-cooperative partition.assignment.strategy
assignors, such as range
and roundrobin
, the application must use rd_kafka_assign() to set or clear the entire assignment. For the cooperative assignors, such as cooperative-sticky
, the application must use rd_kafka_incremental_assign() for RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS and rd_kafka_incremental_unassign() for RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS.
Without a rebalance callback this is done automatically by librdkafka but registering a rebalance callback gives the application flexibility in performing other operations along with the assigning/revocation, such as fetching offsets from an alternate location (on assign) or manually committing offsets (on revoke).
+rebalance_cb is always triggered exactly once when a rebalance completes with a new assignment, even if that assignment is empty. If an eager/non-cooperative assignor is configured, there will eventually be exactly one corresponding call to rebalance_cb to revoke these partitions (even if empty), whether this is due to a group rebalance or lost partitions. In the cooperative case, rebalance_cb will never be called if the set of partitions being revoked is empty (whether or not lost).
+The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
partitions
list is destroyed by librdkafka on return return from the rebalance_cb and must not be freed or saved by the application.partitions
list. Changing this list should only be done to change the initial offsets for each partition. But a function like rd_kafka_position()
might have unexpected effects for instance when a consumer gets assigned a partition it used to consume at an earlier rebalance. In this case, the list of partitions will be updated with the old offset for that partition. In this case, it is generally better to pass a copy of the list (see rd_kafka_topic_partition_list_copy()
). The result of rd_kafka_position()
is typically outdated in RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS.The following example shows the application's responsibilities:
+static void rebalance_cb (rd_kafka_t *rk, rd_kafka_resp_err_t err,
+ rd_kafka_topic_partition_list_t *partitions,
+ void *opaque) {
+
+switch (err)
+ {
+ case RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS:
+ // application may load offets from arbitrary external
+ // storage here and update \p partitions
+ if (!strcmp(rd_kafka_rebalance_protocol(rk), "COOPERATIVE"))
+ rd_kafka_incremental_assign(rk, partitions);
+ else // EAGER
+ rd_kafka_assign(rk, partitions);
+ break;
+
+ case RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS:
+ if (manual_commits) // Optional explicit manual commit
+ rd_kafka_commit(rk, partitions, 0); // sync commit
+
+ if (!strcmp(rd_kafka_rebalance_protocol(rk), "COOPERATIVE"))
+ rd_kafka_incremental_unassign(rk, partitions);
+ else // EAGER
+ rd_kafka_assign(rk, NULL);
+ break;
+
+ default:
+ handle_unlikely_error(err);
+ rd_kafka_assign(rk, NULL); // sync state
+ break;
+ }
+}
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_resp_err_t, rd_kafka_topic_partition_list_t*, void*)See also
+ +public static rd_kafka_conf_set_resolve_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $resolve_cb
+ ): void
+
Set address resolution callback.
+The callback is responsible for resolving the hostname node
and the service service
into a list of socket addresses as getaddrinfo(3)
would. The hints
and res
parameters function as they do for getaddrinfo(3)
. The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
If the callback is invoked with a NULL node
, service
, and hints
, the callback should instead free the addrinfo struct specified in res
. In this case the callback must succeed; the return value will not be checked by the caller.
The callback's return value is interpreted as the return value of getaddrinfo(3)
.
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(const char, const char*, const struct addrinfo*, struct addrinfo**, void*)See also
+ +public static rd_kafka_conf_set_socket_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $socket_cb
+ ): void
+
Set socket callback.
+The socket callback is responsible for opening a socket according to the supplied domain
, type
and protocol
. The socket shall be created with CLOEXEC
set in a racefree fashion, if possible.
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
Default:
+\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(int, int, int, void)See also
+ +public static rd_kafka_conf_set_ssl_cert (
+ \FFI\CData|null $conf,
+ int $cert_type,
+ int $cert_enc,
+ \FFI\CData|object|string|null $buffer,
+ int|null $size,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set certificate/key cert_type
from the cert_enc
encoded memory at buffer
of size
bytes.
cert_type
will replace the previous value.buffer
set to NULL will clear the configuration for cert_type
.ssl.key.password
configuration property prior to calling this function.ssl.key.pem
and ssl.certificate.pem
configuration properties.ssl.ca.pem
configuration property.\FFI\CData|null
rd_kafka_conf_t* - Configuration object.int
rd_kafka_cert_type_t - Certificate or key type to configure.int
rd_kafka_cert_enc_t - Buffer encoding
type.\FFI\CData|object|string|null
const void* - Memory pointer to encoded certificate or key. The memory is not referenced after this function returns.int|null
size_t - Size of memory at buffer
.\FFI\CData|null
char* - Memory were a human-readable error string will be written on failure.int|null
size_t - Size of errstr
, including space for nul-terminator.int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK on success or RD_KAFKA_CONF_INVALID if the memory in buffer
is of incorrect encoding, or if librdkafka was not built with SSL support.See also
+ +public static rd_kafka_conf_set_ssl_cert_verify_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $ssl_cert_verify_cb
+ ): int
+
Sets the verification callback of the broker certificate.
+The verification callback is triggered from internal librdkafka threads upon connecting to a broker. On each connection attempt the callback will be called for each certificate in the broker's certificate chain, starting at the root certification, as long as the application callback returns 1 (valid certificate). broker_name
and broker_id
correspond to the broker the connection is being made to. The x509_error
argument indicates if OpenSSL's verification of the certificate succeed (0) or failed (an OpenSSL error code). The application may set the SSL context error code by returning 0 from the verify callback and providing a non-zero SSL context error code in x509_error
. If the verify callback sets x509_error
to 0, returns 1, and the original x509_error
was non-zero, the error on the SSL context will be cleared. x509_error
is always a valid pointer to an int.
depth
is the depth of the current certificate in the chain, starting at the root certificate.
The certificate itself is passed in binary DER format in buf
of size size
.
The callback must return 1 if verification succeeds, or 0 if verification fails and then write a human-readable error message to errstr
(limited to errstr_size
bytes, including nul-term).
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
x509_error
codes. \FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(rd_kafka_t, const char*, int32_t, int*, int, const char*, size_t, char*, size_t, void*)int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK if SSL is supported in this build, else RD_KAFKA_CONF_INVALID.See also
+ +public static rd_kafka_conf_set_stats_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $stats_cb
+ ): void
+
Set statistics callback in provided conf object.
+The statistics callback is triggered from rd_kafka_poll() every statistics.interval.ms
(needs to be configured separately). Function arguments:
rk
- Kafka handlejson
- String containing the statistics data in JSON formatjson_len
- Length of json
string.opaque
- Application-provided opaque as set by rd_kafka_conf_set_opaque().For more information on the format of json
, see https://github.com/confluentinc/librdkafka/wiki/Statistics
If the application wishes to hold on to the json
pointer and free it at a later time it must return 1 from the stats_cb
. If the application returns 0 from the stats_cb
then librdkafka will immediately free the json
pointer.
See STATISTICS.md for a full definition of the JSON object.
+ +\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(rd_kafka_t, char*, size_t, void*)See also
+ +public static rd_kafka_conf_set_throttle_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $throttle_cb
+ ): void
+
Set throttle callback.
+The throttle callback is used to forward broker throttle times to the application for Produce and Fetch (consume) requests.
+Callbacks are triggered whenever a non-zero throttle time is returned by the broker, or when the throttle time drops back to zero.
+An application must call rd_kafka_poll() or rd_kafka_consumer_poll() at regular intervals to serve queued callbacks.
+The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, const char*, int32_t, int, void*)See also
+ +public static rd_kafka_consume (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Consume a single message from topic rkt
and partition
.
timeout_ms
is maximum amount of time to wait for a message to be received. Consumer must have been previously started with rd_kafka_consume_start()
.
Errors (when returning NULL):
+timeout_ms
was reached with no new messages fetched.rkt
+ partition
is unknown. (no prior rd_kafka_consume_start()
call)NOTE: The returned message's ..->err must be checked for errors. NOTE:
..->err
==
RD_KAFKA_RESP_ERR__PARTITION_EOF
signals that the end of the partition has been reached, which should typically not be considered an error. The application should handle this case (e.g., ignore).
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|null
rd_kafka_message_t* - a message object on success or NULL
on error. The message object must be destroyed with rd_kafka_message_destroy()
when the application is done with it.See also
+ +public static rd_kafka_consume_batch (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $timeout_ms,
+ \FFI\CData|null $rkmessages,
+ int|null $rkmessages_size
+ ): int|null
+
Consume up to rkmessages_size
from topic rkt
and partition
putting a pointer to each message in the application provided array rkmessages
(of size rkmessages_size
entries).
rd_kafka_consume_batch()
provides higher throughput performance than rd_kafka_consume()
.
timeout_ms
is the maximum amount of time to wait for all of rkmessages_size
messages to be put into rkmessages
. If no messages were available within the timeout period this function returns 0 and rkmessages
remains untouched. This differs somewhat from rd_kafka_consume()
.
The message objects must be destroyed with rd_kafka_message_destroy()
when the application is done with it.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|null
rd_kafka_message_t**int|null
size_tint|null
ssize_t - the number of rkmessages added in rkmessages
, or -1 on error (same error codes as for rd_kafka_consume()
.See also
+ +public static rd_kafka_consume_batch_queue (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms,
+ \FFI\CData|null $rkmessages,
+ int|null $rkmessages_size
+ ): int|null
+
Consume batch of messages from queue.
+\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|null
rd_kafka_message_t**int|null
size_tint|null
ssize_tSee also
+ +public static rd_kafka_consume_callback (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $timeout_ms,
+ \FFI\CData|\Closure $consume_cb,
+ \FFI\CData|object|string|null $opaque
+ ): int|null
+
Consumes messages from topic rkt
and partition
, calling the provided callback for each consumed messsage.
rd_kafka_consume_callback()
provides higher throughput performance than both rd_kafka_consume()
and rd_kafka_consume_batch()
.
timeout_ms
is the maximum amount of time to wait for one or more messages to arrive.
The provided consume_cb
function is called for each message, the application MUST NOT call rd_kafka_message_destroy()
on the provided rkmessage
.
The commit_opaque
argument is passed to the consume_cb
as commit_opaque
.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|\Closure
void()(rd_kafka_message_t, void*)\FFI\CData|object|string|null
void*int|null
int - the number of messages processed or -1 on error.See also
+ +public static rd_kafka_consume_callback_queue (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms,
+ \FFI\CData|\Closure $consume_cb,
+ \FFI\CData|object|string|null $opaque
+ ): int|null
+
Consume multiple messages from queue with callback.
+\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|\Closure
void()(rd_kafka_message_t, void*)\FFI\CData|object|string|null
void*int|null
intSee also
+ +public static rd_kafka_consume_queue (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Consume from queue.
+\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|null
rd_kafka_message_t*See also
+ +public static rd_kafka_consume_start (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset
+ ): int|null
+
Start consuming messages for topic rkt
and partition
at offset offset
which may either be an absolute (0..N) or one of the logical offsets:
rdkafka will attempt to keep queued.min.messages
(config property) messages in the local queue by repeatedly fetching batches of messages from the broker until the threshold is reached.
The application shall use one of the rd_kafka_consume*()
functions to consume messages from the local queue, each kafka message being represented as a rd_kafka_message_t *
object.
rd_kafka_consume_start()
must not be called multiple times for the same topic and partition without stopping consumption first with rd_kafka_consume_stop()
.
Use rd_kafka_errno2err()
to convert sytem errno
to rd_kafka_resp_err_t
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_tint|null
int - 0 on success or -1 on error in which case errno is set accordingly:partition
is invalid. (RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION)See also
+ +public static rd_kafka_consume_start_queue (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset,
+ \FFI\CData|null $rkqu
+ ): int|null
+
Same as rd_kafka_consume_start() but re-routes incoming messages to the provided queue rkqu
(which must have been previously allocated with rd_kafka_queue_new()
.
The application must use one of the rd_kafka_consume_*_queue()
functions to receive fetched messages.
rd_kafka_consume_start_queue()
must not be called multiple times for the same topic and partition without stopping consumption first with rd_kafka_consume_stop()
. rd_kafka_consume_start()
and rd_kafka_consume_start_queue()
must not be combined for the same topic and partition.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_t\FFI\CData|null
rd_kafka_queue_t*int|null
intSee also
+ +public static rd_kafka_consume_stop (
+ \FFI\CData|null $rkt,
+ int|null $partition
+ ): int|null
+
Stop consuming messages for topic rkt
and partition
, purging all messages currently in the local queue.
NOTE: To enforce synchronisation this call will block until the internal fetcher has terminated and offsets are committed to configured storage method.
+The application needs to be stop all consumers before calling rd_kafka_destroy()
on the main object handle.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int - 0 on success or -1 on error (see errno
).See also
+ +public static rd_kafka_consumer_close (
+ \FFI\CData|null $rk
+ ): int
+
Close the consumer.
+This call will block until the consumer has revoked its assignment, calling the rebalance_cb
if it is configured, committed offsets to broker, and left the consumer group (if applicable). The maximum blocking time is roughly limited to session.timeout.ms.
\FFI\CData|null
rd_kafka_t* - )int
rd_kafka_resp_err_t - An error code indicating if the consumer close was succesful or not. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.See also
+ +public static rd_kafka_consumer_close_queue (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkqu
+ ): \FFI\CData|null
+
Asynchronously close the consumer.
+Performs the same actions as rd_kafka_consumer_close() but in a background thread.
+Rebalance events/callbacks (etc) will be forwarded to the application-provided rkqu
. The application must poll/serve this queue until rd_kafka_consumer_closed() returns true.
rkqu
.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_queue_t*\FFI\CData|null
rd_kafka_error_t* - an error object if the consumer close failed, else NULL.See also
+ +public static rd_kafka_consumer_closed (
+ \FFI\CData|null $rk
+ ): int|null
+
Should be used in conjunction with rd_kafka_consumer_close_queue() to know when the consumer has been closed.
+\FFI\CData|null
rd_kafka_t* - )int|null
int - 1 if the consumer is closed, else 0.See also
+ +public static rd_kafka_consumer_group_metadata (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_consumer_group_metadata_t* - the current consumer group metadata associated with this consumer, or NULL if rk
is not a consumer configured with a group.id
. This metadata object should be passed to the transactional producer’s rd_kafka_send_offsets_to_transaction() API.See also
+ +public static rd_kafka_consumer_group_metadata_destroy (
+ \FFI\CData|null $arg0
+ ): void
+
\FFI\CData|null
rd_kafka_consumer_group_metadata_t*public static rd_kafka_consumer_group_metadata_new (
+ string|null $group_id
+ ): \FFI\CData|null
+
Create a new consumer group metadata object. This is typically only used for writing tests.
+ +string|null
const char* - ) - The group id.\FFI\CData|null
rd_kafka_consumer_group_metadata_t*See also
+ +public static rd_kafka_consumer_group_metadata_new_with_genid (
+ string|null $group_id,
+ int|null $generation_id,
+ string|null $member_id,
+ string|null $group_instance_id
+ ): \FFI\CData|null
+
Create a new consumer group metadata object. This is typically only used for writing tests.
+ +string|null
const char* - The group id.int|null
int32_t - The group generation id.string|null
const char* - The group member id.string|null
const char* - The group instance id (may be NULL).\FFI\CData|null
rd_kafka_consumer_group_metadata_t*See also
+ +public static rd_kafka_consumer_group_metadata_read (
+ \FFI\CData|null $cgmdp,
+ \FFI\CData|object|string|null $buffer,
+ int|null $size
+ ): \FFI\CData|null
+
Reads serialized consumer group metadata and returns a consumer group metadata object. This is mainly for client binding use and not for application use.
+\FFI\CData|null
rd_kafka_consumer_group_metadata_t** - On success this pointer will be updated to point to a new consumer group metadata object which must be freed with rd_kafka_consumer_group_metadata_destroy().\FFI\CData|object|string|null
const void* - Pointer to the serialized data.int|null
size_t - Size of the serialized data.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_consumer_group_metadata_write (
+ \FFI\CData|null $cgmd,
+ \FFI\CData|object|string|null $bufferp,
+ \FFI\CData|null $sizep
+ ): \FFI\CData|null
+
Serialize the consumer group metadata to a binary format. This is mainly for client binding use and not for application use.
+\FFI\CData|null
const rd_kafka_consumer_group_metadata_t* - Metadata to be serialized.\FFI\CData|object|string|null
void** - On success this pointer will be updated to point to na allocated buffer containing the serialized metadata. The buffer must be freed with rd_kafka_mem_free().\FFI\CData|null
size_t* - The pointed to size will be updated with the size of the serialized buffer.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_consumer_group_state_code (
+ string|null $name
+ ): int
+
Returns a code for a state name.
+ +string|null
const char* - ) - The state name.int
rd_kafka_consumer_group_state_t - The group state value corresponding to the provided group state name.See also
+ +public static rd_kafka_consumer_group_state_name (
+ int $state
+ ): string|null
+
Returns a name for a state code.
+ +int
rd_kafka_consumer_group_state_t - ) - The state value.string|null
const char* - The group state name corresponding to the provided group state value.See also
+ +public static rd_kafka_consumer_poll (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Poll the consumer for messages or events.
+Will block for at most timeout_ms
milliseconds.
max.poll.interval.ms
to remain a member of the consumer group.Noteworthy errors returned in ->err:
max.poll.interval.ms
.\FFI\CData|null
rd_kafka_t*int|null
int\FFI\CData|null
rd_kafka_message_t* - A message object which is a proper message if ->err
is RD_KAFKA_RESP_ERR_NO_ERROR, or an event or error for any other value.See also
+ +public static rd_kafka_controllerid (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): int|null
+
Returns the current ControllerId as reported in broker metadata.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.int|null
int - If there is no cached value from metadata retrieval then this specifies the maximum amount of time (in milliseconds) the call will block waiting for metadata to be retrieved. Use 0 for non-blocking calls.int|null
int32_t - the controller broker id (>= 0), or -1 if no ControllerId could be retrieved in the allotted timespan.See also
+ +public static rd_kafka_default_topic_conf_dup (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_conf_t*public static rd_kafka_destroy (
+ \FFI\CData|null $rk
+ ): void
+
Destroy Kafka handle.
+group.id
was configured, and the rd_kafka_consumer_close() was not explicitly called by the application. This in turn may trigger consumer callbacks, such as rebalance_cb. Use rd_kafka_destroy_flags() with RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE to avoid this behaviour.\FFI\CData|null
rd_kafka_t* - )See also
+ +public static rd_kafka_destroy_flags (
+ \FFI\CData|null $rk,
+ int|null $flags
+ ): void
+
\FFI\CData|null
rd_kafka_t*int|null
intpublic static rd_kafka_dump (
+ \FFI\CData|null $fp,
+ \FFI\CData|null $rk
+ ): void
+
Dumps rdkafka's internal state for handle rk
to stream fp
.
This is only useful for debugging rdkafka, showing state and statistics for brokers, topics, partitions, etc.
+ +\FFI\CData|null
FILE*\FFI\CData|null
rd_kafka_t*See also
+ +public static rd_kafka_err2name (
+ int $err
+ ): string|null
+
Returns the error code name (enum name).
+ +int
rd_kafka_resp_err_t - ) - Error code to translatestring|null
const char*See also
+ +public static rd_kafka_err2str (
+ int $err
+ ): string|null
+
Returns a human readable representation of a kafka error.
+ +int
rd_kafka_resp_err_t - ) - Error code to translatestring|null
const char*See also
+ +public static rd_kafka_errno ( ): int|null
+
Returns the thread-local system errno.
+On most platforms this is the same as errno
but in case of different runtimes between library and application (e.g., Windows static DLLs) this provides a means for exposing the errno librdkafka uses.
int|null
int - )See also
+ +public static rd_kafka_errno2err (
+ int|null $errnox
+ ): int
+
Converts the system errno value errnox
to a rd_kafka_resp_err_t error code upon failure from the following functions:
int|null
int - ) - System errno value to convertint
rd_kafka_resp_err_t - Appropriate error code for errnox
See also
+ +public static rd_kafka_error_code (
+ \FFI\CData|null $error
+ ): int
+
\FFI\CData|null
const rd_kafka_error_t* - )int
rd_kafka_resp_err_t - the error code for error
or RD_KAFKA_RESP_ERR_NO_ERROR if error
is NULL.See also
+ +public static rd_kafka_error_destroy (
+ \FFI\CData|null $error
+ ): void
+
Free and destroy an error object.
+error
. \FFI\CData|null
rd_kafka_error_t* - )See also
+ +public static rd_kafka_error_is_fatal (
+ \FFI\CData|null $error
+ ): int|null
+
\FFI\CData|null
const rd_kafka_error_t* - )int|null
int - 1 if the error is a fatal error, indicating that the client instance is no longer usable, else 0 (also if error
is NULL).See also
+ +public static rd_kafka_error_is_retriable (
+ \FFI\CData|null $error
+ ): int|null
+
\FFI\CData|null
const rd_kafka_error_t* - )int|null
int - 1 if the operation may be retried, else 0 (also if error
is NULL).See also
+ +public static rd_kafka_error_name (
+ \FFI\CData|null $error
+ ): string|null
+
\FFI\CData|null
const rd_kafka_error_t* - )string|null
const char* - the error code name for error
, e.g, “ERR_UNKNOWN_MEMBER_ID”, or an empty string if error
is NULL.See also
+ +public static rd_kafka_error_new (
+ int $code,
+ string|null $fmt,
+ mixed $args
+ ): \FFI\CData|null
+
Create a new error object with error code
and optional human readable error string in fmt
.
This method is mainly to be used for mocking errors in application test code.
+The returned object must be destroyed with rd_kafka_error_destroy().
+ +int
rd_kafka_resp_err_tstring|null
const char*mixed
\FFI\CData|null
rd_kafka_error_t*See also
+ +public static rd_kafka_error_string (
+ \FFI\CData|null $error
+ ): string|null
+
\FFI\CData|null
const rd_kafka_error_t* - )string|null
const char* - a human readable error string for error
, or an empty string if error
is NULL.See also
+ +public static rd_kafka_error_txn_requires_abort (
+ \FFI\CData|null $error
+ ): int|null
+
\FFI\CData|null
const rd_kafka_error_t* - )int|null
int - 1 if the error is an abortable transaction error in which case the application must call rd_kafka_abort_transaction() and start a new transaction with rd_kafka_begin_transaction() if it wishes to proceed with transactions. Else returns 0 (also if error
is NULL).See also
+ +public static rd_kafka_event_AlterConfigs_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get AlterConfigs result.
+ +Event types: RD_KAFKA_EVENT_ALTERCONFIGS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_AlterConfigs_result_t* - the result of a AlterConfigs request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_AlterConsumerGroupOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get AlterConsumerGroupOffsets result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_AlterConsumerGroupOffsets_result_t* - the result of a AlterConsumerGroupOffsets request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_AlterUserScramCredentials_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get AlterUserScramCredentials result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_ALTERUSERSCRAMCREDENTIALS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_t* - the result of a AlterUserScramCredentials request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_CreateAcls_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_CREATEACLS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_CreateAcls_result_t* - the result of a CreateAcls request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_CreatePartitions_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get CreatePartitions result.
+ +Event types: RD_KAFKA_EVENT_CREATEPARTITIONS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_CreatePartitions_result_t* - the result of a CreatePartitions request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_CreateTopics_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get CreateTopics result.
+ +Event types: RD_KAFKA_EVENT_CREATETOPICS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_CreateTopics_result_t* - the result of a CreateTopics request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteAcls_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_DELETEACLS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteAcls_result_t* - the result of a DeleteAcls request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteConsumerGroupOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DeleteConsumerGroupOffsets result.
+ +Event types: RD_KAFKA_EVENT_DELETECONSUMERGROUPOFFSETS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteConsumerGroupOffsets_result_t* - the result of a DeleteConsumerGroupOffsets request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteGroups_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DeleteGroups result.
+ +Event types: RD_KAFKA_EVENT_DELETEGROUPS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteGroups_result_t* - the result of a DeleteGroups request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteRecords_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_DELETERECORDS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteRecords_result_t* - the result of a DeleteRecords request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteTopics_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DeleteTopics result.
+ +Event types: RD_KAFKA_EVENT_DELETETOPICS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteTopics_result_t* - the result of a DeleteTopics request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeAcls_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_DESCRIBEACLS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeAcls_result_t* - the result of a DescribeAcls request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeCluster_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*public static rd_kafka_event_DescribeConfigs_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DescribeConfigs result.
+ +Event types: RD_KAFKA_EVENT_DESCRIBECONFIGS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeConfigs_result_t* - the result of a DescribeConfigs request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeConsumerGroups_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DescribeConsumerGroups result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeConsumerGroups_result_t* - the result of a DescribeConsumerGroups request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeTopics_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_DescribeTopics_result_t*public static rd_kafka_event_DescribeUserScramCredentials_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DescribeUserScramCredentials result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_DESCRIBEUSERSCRAMCREDENTIALS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeUserScramCredentials_result_t* - the result of a DescribeUserScramCredentials request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_IncrementalAlterConfigs_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get IncrementalAlterConfigs result.
+ +Event types: RD_KAFKA_EVENT_INCREMENTALALTERCONFIGS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_IncrementalAlterConfigs_result_t* - the result of a IncrementalAlterConfigs request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_ListConsumerGroupOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get ListConsumerGroupOffsets result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_ListConsumerGroupOffsets_result_t* - the result of a ListConsumerGroupOffsets request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_ListConsumerGroups_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get ListConsumerGroups result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_ListConsumerGroups_result_t* - the result of a ListConsumerGroups request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_ListOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_ListOffsets_result_t*public static rd_kafka_event_config_string (
+ \FFI\CData|null $rkev
+ ): string|null
+
The returned memory is read-only and its lifetime is the same as the event object.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )string|null
const char* - the associated configuration string for the event, or NULL if the configuration property is not set or if not applicable for the given event type.See also
+ +public static rd_kafka_event_debug_contexts (
+ \FFI\CData|null $rkev,
+ \FFI\CData|null $dst,
+ int|null $dstsize
+ ): int|null
+
Extract log debug context from event.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - the event to extract data from.\FFI\CData|null
char* - destination string for comma separated list.int|null
size_t - size of provided dst buffer.int|null
int - 0 on success or -1 if unsupported event type.See also
+ +public static rd_kafka_event_destroy (
+ \FFI\CData|null $rkev
+ ): void
+
Destroy an event.
+rkev
as NULL in which case no action is performed. \FFI\CData|null
rd_kafka_event_t* - )See also
+ +public static rd_kafka_event_error (
+ \FFI\CData|null $rkev
+ ): int
+
Use rd_kafka_event_error_is_fatal() to detect if this is a fatal error.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )int
rd_kafka_resp_err_t - the error code for the event.See also
+ +public static rd_kafka_event_error_is_fatal (
+ \FFI\CData|null $rkev
+ ): int|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )int|null
int - 1 if the error is a fatal error, else 0.See also
+ +public static rd_kafka_event_error_string (
+ \FFI\CData|null $rkev
+ ): string|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )string|null
const char* - the error string (if any). An application should check that rd_kafka_event_error() returns non-zero before calling this function.See also
+ +public static rd_kafka_event_log (
+ \FFI\CData|null $rkev,
+ \FFI\CData|null $fac,
+ \FFI\CData|null $str,
+ \FFI\CData|null $level
+ ): int|null
+
Extract log message from the event.
+Event types:
+\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const char**\FFI\CData|null
const char**\FFI\CData|null
int*int|null
int - 0 on success or -1 if unsupported event type.See also
+ +public static rd_kafka_event_message_array (
+ \FFI\CData|null $rkev,
+ \FFI\CData|null $rkmessages,
+ int|null $size
+ ): int|null
+
Extacts size
message(s) from the event into the pre-allocated array rkmessages
.
Event types:
+\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_message_t**int|null
size_tint|null
size_t - the number of messages extracted.See also
+ +public static rd_kafka_event_message_count (
+ \FFI\CData|null $rkev
+ ): int|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )int|null
size_t - the number of remaining messages in the event.See also
+ +public static rd_kafka_event_message_next (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Call repeatedly until it returns NULL.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_message_t* - the next message from an event.See also
+ +public static rd_kafka_event_name (
+ \FFI\CData|null $rkev
+ ): string|null
+
rkev
as NULL in which case the name for RD_KAFKA_EVENT_NONE is returned. \FFI\CData|null
const rd_kafka_event_t* - )string|null
const char* - the event type’s name for the given event.See also
+ +public static rd_kafka_event_opaque (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|object|string|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|object|string|null
void* - the event opaque (if any) as passed to rd_kafka_commit() (et.al) or rd_kafka_AdminOptions_set_opaque(), depending on event type.See also
+ +public static rd_kafka_event_stats (
+ \FFI\CData|null $rkev
+ ): string|null
+
Extract stats from the event.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )string|null
const char* - stats json string.See also
+ +public static rd_kafka_event_topic_partition (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_ERROR (for partition level errors)
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
rd_kafka_topic_partition_t* - a newly allocated topic_partition container, if applicable for the event type, else NULL.See also
+ +public static rd_kafka_event_topic_partition_list (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
rd_kafka_topic_partition_list_t* - the topic partition list from the event.See also
+ +public static rd_kafka_event_type (
+ \FFI\CData|null $rkev
+ ): int|null
+
rkev
as NULL in which case RD_KAFKA_EVENT_NONE is returned. \FFI\CData|null
const rd_kafka_event_t* - )int|null
rd_kafka_event_type_t - the event type for the given event.See also
+ +public static rd_kafka_fatal_error (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Returns the first fatal error set on this client instance, or RD_KAFKA_RESP_ERR_NO_ERROR if no fatal error has occurred.
+This function is to be used with the Idempotent Producer and error_cb
to detect fatal errors.
Generally all errors raised by error_cb
are to be considered informational and temporary, the client will try to recover from all errors in a graceful fashion (by retrying, etc).
However, some errors should logically be considered fatal to retain consistency; in particular a set of errors that may occur when using the Idempotent Producer and the in-order or exactly-once producer guarantees can't be satisfied.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written to if there is a fatal error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if no fatal error has been raised, else any other error code.See also
+ +public static rd_kafka_flush (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): int
+
Wait until all outstanding produce requests, et.al, are completed. This should typically be done prior to destroying a producer instance to make sure all queued and in-flight produce requests are completed before terminating.
+linger.ms
time will be ignored for the duration of the call, queued messages will be sent to the broker as soon as possible.\FFI\CData|null
rd_kafka_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__TIMED_OUT if timeout_ms
was reached before all outstanding requests were completed, else RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_get_debug_contexts ( ): string|null
+
Retrieve supported debug contexts for use with the "debug"
configuration property. (runtime)
string|null
const char* - ) - Comma-separated list of available debugging contexts.See also
+ +public static rd_kafka_get_err_descs (
+ \FFI\CData|null $errdescs,
+ \FFI\CData|null $cntp
+ ): void
+
\FFI\CData|null
const struct rd_kafka_err_desc**\FFI\CData|null
size_t*public static rd_kafka_get_watermark_offsets (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ int|null $partition,
+ \FFI\CData|null $low,
+ \FFI\CData|null $high
+ ): int
+
Get last known low (oldest/beginning) and high (newest/end) offsets for partition.
+The low offset is updated periodically (if statistics.interval.ms is set) while the high offset is updated on each fetched message set from the broker.
+If there is no cached offset (either low or high, or both) then RD_KAFKA_OFFSET_INVALID will be returned for the respective offset.
+Offsets are returned in *low
and *high
respectively.
\FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int32_t\FFI\CData|null
int64_t*\FFI\CData|null
int64_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure.See also
+ +public static rd_kafka_group_list_destroy (
+ \FFI\CData|null $grplist
+ ): void
+
\FFI\CData|null
const struct rd_kafka_group_list*public static rd_kafka_group_result_error (
+ \FFI\CData|null $groupres
+ ): \FFI\CData|null
+
Group result provides per-group operation result information.
+ +groupres
. \FFI\CData|null
const rd_kafka_group_result_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error for the given group result, or NULL on success.See also
+ +public static rd_kafka_group_result_name (
+ \FFI\CData|null $groupres
+ ): string|null
+
groupres
. \FFI\CData|null
const rd_kafka_group_result_t* - )string|null
const char* - the name of the group for the given group result.See also
+ +public static rd_kafka_group_result_partitions (
+ \FFI\CData|null $groupres
+ ): \FFI\CData|null
+
groupres
. \FFI\CData|null
const rd_kafka_group_result_t* - )\FFI\CData|null
const rd_kafka_topic_partition_list_t* - the partitions/offsets for the given group result, if applicable to the request type, else NULL.See also
+ +public static rd_kafka_handle_mock_cluster (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_t*\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_header_add (
+ \FFI\CData|null $hdrs,
+ string|null $name,
+ int|null $name_size,
+ \FFI\CData|object|string|null $value,
+ int|null $value_size
+ ): int
+
Add header with name name
and value val
(copied) of size size
(not including null-terminator).
\FFI\CData|null
rd_kafka_headers_t* - Headers list.string|null
const char* - Header name.int|null
ssize_t - Header name size (not including the null-terminator). If -1 the name
length is automatically acquired using strlen().\FFI\CData|object|string|null
const void* - Pointer to header value, or NULL (set size to 0 or -1).int|null
ssize_t - Size of header value. If -1 the value
is assumed to be a null-terminated string and the length is automatically acquired using strlen().int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__READ_ONLY if the headers are read-only, else RD_KAFKA_RESP_ERR_NO_ERROR.See also
+ +public static rd_kafka_header_cnt (
+ \FFI\CData|null $hdrs
+ ): int|null
+
Returns the number of header key/value pairs.
+ +\FFI\CData|null
const rd_kafka_headers_t* - ) - Headers to countint|null
size_tSee also
+ +public static rd_kafka_header_get (
+ \FFI\CData|null $hdrs,
+ int|null $idx,
+ string|null $name,
+ \FFI\CData|object|string|null $valuep,
+ \FFI\CData|null $sizep
+ ): int
+
Iterator for headers matching name
.
Same semantics as rd_kafka_header_get_last() ++ +
\FFI\CData|null
const rd_kafka_headers_t* - Headers to iterate.int|null
size_t - Iterator index, start at 0 and increment by one for each call as long as RD_KAFKA_RESP_ERR_NO_ERROR is returned.string|null
const char* - Header name to match.\FFI\CData|object|string|null
const void** - (out) Set to a (null-terminated) const pointer to the value (may be NULL).\FFI\CData|null
size_t* - (out) Set to the value’s size (not including null-terminator).int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_header_get_all (
+ \FFI\CData|null $hdrs,
+ int|null $idx,
+ \FFI\CData|null $namep,
+ \FFI\CData|object|string|null $valuep,
+ \FFI\CData|null $sizep
+ ): int
+
Iterator for all headers.
+Same semantics as rd_kafka_header_get() ++
\FFI\CData|null
const rd_kafka_headers_t*int|null
size_t\FFI\CData|null
const char**\FFI\CData|object|string|null
const void**\FFI\CData|null
size_t*int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_header_get_last (
+ \FFI\CData|null $hdrs,
+ string|null $name,
+ \FFI\CData|object|string|null $valuep,
+ \FFI\CData|null $sizep
+ ): int
+
Find last header in list hdrs
matching name
.
valuep
includes a trailing null-terminator that is not accounted for in sizep
. \FFI\CData|null
const rd_kafka_headers_t* - Headers list.string|null
const char* - Header to find (last match).\FFI\CData|object|string|null
const void** - (out) Set to a (null-terminated) const pointer to the value (may be NULL).\FFI\CData|null
size_t* - (out) Set to the value’s size (not including null-terminator).int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if an entry was found, else RD_KAFKA_RESP_ERR__NOENT.See also
+ +public static rd_kafka_header_remove (
+ \FFI\CData|null $hdrs,
+ string|null $name
+ ): int
+
Remove all headers for the given key (if any).
+ +\FFI\CData|null
rd_kafka_headers_t*string|null
const char*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__READ_ONLY if the headers are read-only, RD_KAFKA_RESP_ERR__NOENT if no matching headers were found, else RD_KAFKA_RESP_ERR_NO_ERROR if headers were removed.See also
+ +public static rd_kafka_headers_copy (
+ \FFI\CData|null $src
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_headers_t*\FFI\CData|null
rd_kafka_headers_t*public static rd_kafka_headers_destroy (
+ \FFI\CData|null $hdrs
+ ): void
+
\FFI\CData|null
rd_kafka_headers_t*public static rd_kafka_headers_new (
+ int|null $initial_count
+ ): \FFI\CData|null
+
Create a new headers list.
+ +int|null
size_t - ) - Preallocate space for this number of headers. Any number of headers may be added, updated and removed regardless of the initial count.\FFI\CData|null
rd_kafka_headers_t*See also
+ +public static rd_kafka_incremental_assign (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Incrementally add partitions
to the current assignment.
If a COOPERATIVE assignor (i.e. incremental rebalancing) is being used, this method should be used in a rebalance callback to adjust the current assignment appropriately in the case where the rebalance type is RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS. The application must pass the partition list passed to the callback (or a copy of it), even if the list is empty. partitions
must not be NULL. This method may also be used outside the context of a rebalance callback.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*\FFI\CData|null
rd_kafka_error_t* - NULL on success, or an error object if the operation was unsuccessful.See also
+ +public static rd_kafka_incremental_unassign (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Incrementally remove partitions
from the current assignment.
If a COOPERATIVE assignor (i.e. incremental rebalancing) is being used, this method should be used in a rebalance callback to adjust the current assignment appropriately in the case where the rebalance type is RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS. The application must pass the partition list passed to the callback (or a copy of it), even if the list is empty. partitions
must not be NULL. This method may also be used outside the context of a rebalance callback.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*\FFI\CData|null
rd_kafka_error_t* - NULL on success, or an error object if the operation was unsuccessful.See also
+ +public static rd_kafka_init_transactions (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Initialize transactions for the producer instance.
+This function ensures any transactions initiated by previous instances of the producer with the same transactional.id
are completed. If the previous instance failed with a transaction in progress the previous transaction will be aborted. This function needs to be called before any other transactional or produce functions are called when the transactional.id
is configured.
If the last transaction had begun completion (following transaction commit) but not yet finished, this function will await the previous transaction's completion.
+When any previous transactions have been fenced this function will acquire the internal producer id and epoch, used in all future transactional messages issued by this producer instance.
+ +timeout_ms
milliseconds.\FFI\CData|null
rd_kafka_t* - Producer instance.int|null
int - The maximum time to block. On timeout the operation may continue in the background, depending on state, and it is okay to call init_transactions() again. If an infinite timeout (-1) is passed, the timeout will be adjusted to 2 * transaction.timeout.ms
.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether a fatal error has been raised by calling rd_kafka_error_is_fatal(). Error codes: RD_KAFKA_RESP_ERR__TIMED_OUT if the transaction coordinator could be not be contacted within timeout_ms
(retriable), RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE if the transaction coordinator is not available (retriable), RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS if a previous transaction would not complete within timeout_ms
(retriable), RD_KAFKA_RESP_ERR__STATE if transactions have already been started or upon fatal error, RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE if the broker(s) do not support transactions (<Apache Kafka 0.11), this also raises a fatal error, RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT if the configured transaction.timeout.ms
is outside the broker-configured range, this also raises a fatal error, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, or timeout_ms
is out of range. Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_interceptor_add_on_acknowledgement (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_acknowledgement,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_acknowledgement() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_acknowledgement_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_broker_state_change (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_broker_state_change,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_broker_state_change() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_broker_state_change_t*)(rd_kafka_t*, int32_t, const char*, const char*, int, const char*, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_commit (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_commit,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_commit() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_commit_t*)(rd_kafka_t*, const rd_kafka_topic_partition_list_t*, rd_kafka_resp_err_t, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_consume (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_consume,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_consume() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_consume_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_destroy (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_destroy,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_destroy() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_destroy_t*)(rd_kafka_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_request_sent (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_request_sent,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_request_sent() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_request_sent_t*)(rd_kafka_t*, int, const char*, int32_t, int16_t, int16_t, int32_t, size_t, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_response_received (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_response_received,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_response_received() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_response_received_t*)(rd_kafka_t*, int, const char*, int32_t, int16_t, int16_t, int32_t, size_t, int64_t, rd_kafka_resp_err_t, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_send (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_send,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_send() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_send_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing intercepted with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_thread_exit (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_thread_exit,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_thread_exit() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_thread_exit_t*)(rd_kafka_t*, rd_kafka_thread_type_t, const char*, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_thread_start (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_thread_start,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_thread_start() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_thread_start_t*)(rd_kafka_t*, rd_kafka_thread_type_t, const char*, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_f_on_acknowledgement_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_acknowledgement() is called to inform interceptors that a message was succesfully delivered or permanently failed delivery. The interceptor chain is called from internal librdkafka background threads, or rd_kafka_produce*() if the partitioner failed.
+ +rkmessage
object is NOT mutable and MUST NOT be modified by the interceptor.rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
rd_kafka_message_t* - The message being produced. Immutable.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_broker_state_change_t (
+ \FFI\CData|null $rk,
+ int|null $broker_id,
+ string|null $secproto,
+ string|null $name,
+ int|null $port,
+ string|null $state,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_broker_state_change() is called just after a broker has been created or its state has been changed.
+ +\FFI\CData|null
rd_kafka_t* - The client instance.int|null
int32_t - The broker id (-1 is used for bootstrap brokers).string|null
const char* - The security protocol.string|null
const char* - The original name of the broker.int|null
int - The port of the broker.string|null
const char* - Broker state name.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_commit_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ int $err,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_commit() is called on completed or failed offset commit. It is called from internal librdkafka threads.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - List of topic+partition+offset+error that were committed. The error message of each partition should be checked for error.int
rd_kafka_resp_err_t - The commit error, if any.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_conf_destroy_t (
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_conf_destroy() is called from rd_kafka_*_conf_destroy() in the order the interceptors were added.
+ +\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_interceptor_f_on_conf_dup_t (
+ \FFI\CData|null $new_conf,
+ \FFI\CData|null $old_conf,
+ int|null $filter_cnt,
+ \FFI\CData|null $filter,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_conf_dup() is called from rd_kafka_conf_dup() in the order the interceptors were added and is used to let an interceptor re-register its conf interecptors with a new opaque value. The on_conf_dup() method is called prior to the configuration from old_conf
being copied to new_conf
.
\FFI\CData|null
rd_kafka_conf_t* - New configuration object.\FFI\CData|null
const rd_kafka_conf_t* - Old configuration object to copy properties from.int|null
size_t - Number of property names to filter in filter
. - Property names to filter out (ignore) when setting up new_conf
.\FFI\CData|null
const char**\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure (which is logged but otherwise ignored).See also
+ +public static rd_kafka_interceptor_f_on_conf_set_t (
+ \FFI\CData|null $conf,
+ string|null $name,
+ string|null $val,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_conf_set() is called from rd_kafka_*_conf_set() in the order the interceptors were added.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - The configuration property to set.string|null
const char* - The configuration value to set, or NULL for reverting to default in which case the previous value should be freed.\FFI\CData|null
char* - A human readable error string in case the interceptor fails.int|null
size_t - Maximum space (including \0) in errstr
.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK if the property was known and successfully handled by the interceptor, RD_KAFKA_CONF_INVALID if the property was handled by the interceptor but the value was invalid, or RD_KAFKA_CONF_UNKNOWN if the interceptor did not handle this property, in which case the property is passed on on the interceptor in the chain, finally ending up at the built-in configuration handler.See also
+ +public static rd_kafka_interceptor_f_on_consume_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_consume() is called just prior to passing the message to the application in rd_kafka_consumer_poll(), rd_kafka_consume*(), the event interface, etc.
+ +rkmessage
object is NOT mutable and MUST NOT be modified by the interceptor.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
rd_kafka_message_t* - The message being consumed. Immutable.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_destroy_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_destroy() is called from rd_kafka_destroy() or (rd_kafka_new() if rd_kafka_new() fails during initialization).
+ +\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_interceptor_f_on_new_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $ic_opaque,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
on_new() is called from rd_kafka_new() prior toreturning the newly created client instance to the application.
+ +rk
client instance will not be fully set up when this interceptor is called and the interceptor MUST NOT call any other rk-specific APIs than rd_kafka_interceptor_add..(). \FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
const rd_kafka_conf_t* - The client instance’s final configuration.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().\FFI\CData|null
char* - A human readable error string in case the interceptor fails.int|null
size_t - Maximum space (including \0) in errstr
.int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_request_sent_t (
+ \FFI\CData|null $rk,
+ int|null $sockfd,
+ string|null $brokername,
+ int|null $brokerid,
+ int|null $ApiKey,
+ int|null $ApiVersion,
+ int|null $CorrId,
+ int|null $size,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_request_sent() is called when a request has been fully written to a broker TCP connections socket.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int|null
int - Socket file descriptor.string|null
const char* - Broker request is being sent to.int|null
int32_t - Broker request is being sent to.int|null
int16_t - Kafka protocol request type.int|null
int16_t - Kafka protocol request type version.int|null
int32_t - Kafka protocol request correlation id.int|null
size_t - Size of request.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_response_received_t (
+ \FFI\CData|null $rk,
+ int|null $sockfd,
+ string|null $brokername,
+ int|null $brokerid,
+ int|null $ApiKey,
+ int|null $ApiVersion,
+ int|null $CorrId,
+ int|null $size,
+ int|null $rtt,
+ int $err,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_response_received() is called when a protocol response has been fully received from a broker TCP connection socket but before the response payload is parsed.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int|null
int - Socket file descriptor (always -1).string|null
const char* - Broker response was received from, possibly empty string on error.int|null
int32_t - Broker response was received from.int|null
int16_t - Kafka protocol request type or -1 on error.int|null
int16_t - Kafka protocol request type version or -1 on error.int|null
int32_t - Kafka protocol request correlation id, possibly -1 on error.int|null
size_t - Size of response, possibly 0 on error.int|null
int64_t - Request round-trip-time in microseconds, possibly -1 on error.int
rd_kafka_resp_err_t - Receive error.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_send_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_send() is called from rd_kafka_produce*() (et.al) prior to the partitioner being called.
+ +rkmessage
object is NOT mutable and MUST NOT be modified by the interceptor.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
rd_kafka_message_t* - The message being produced. Immutable.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_thread_exit_t (
+ \FFI\CData|null $rk,
+ int $thread_type,
+ string|null $thread_name,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_thread_exit() is called just prior to a librdkafka-managed thread exiting from the exiting thread itself.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int
rd_kafka_thread_type_t - Thread type.nstring|null
const char* - Human-readable thread name, may not be unique.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_thread_start_t (
+ \FFI\CData|null $rk,
+ int $thread_type,
+ string|null $thread_name,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_thread_start() is called from a newly created librdkafka-managed thread.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int
rd_kafka_thread_type_t - Thread type.string|null
const char* - Human-readable thread name, may not be unique.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_last_error ( ): int
+
Returns the last error code generated by a legacy API call in the current thread.
+The legacy APIs are the ones using errno to propagate error value, namely:
+The main use for this function is to avoid converting system errno
values to rd_kafka_resp_err_t codes for legacy APIs.
int
rd_kafka_resp_err_t - )See also
+ +public static rd_kafka_list_groups (
+ \FFI\CData|null $rk,
+ string|null $group,
+ \FFI\CData|null $grplistp,
+ int|null $timeout_ms
+ ): int
+
List and describe client groups in cluster.
+group
is an optional group name to describe, otherwise (NULL
) all groups are returned.
timeout_ms
is the (approximate) maximum time to wait for response from brokers and must be a positive value.
The grplistp
remains untouched if any error code is returned, with the exception of RD_KAFKA_RESP_ERR__PARTIAL which behaves as RD_KAFKA_RESP_ERR__NO_ERROR (success) but with an incomplete group list.
\FFI\CData|null
rd_kafka_t*string|null
const char*\FFI\CData|null
const struct rd_kafka_group_list**int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__NO_ERROR
on success and grplistp
is updated to point to a newly allocated list of groups. RD_KAFKA_RESP_ERR__PARTIAL
if not all brokers responded in time but at least one group is returned in grplistlp
. RD_KAFKA_RESP_ERR__TIMED_OUT
if no groups were returned in the given timeframe but not all brokers have yet responded, or if the list of brokers in the cluster could not be obtained within the given timeframe. RD_KAFKA_RESP_ERR__TRANSPORT
if no brokers were found. Other error codes may also be returned from the request layer.See also
+ +public static rd_kafka_log_print (
+ \FFI\CData|null $rk,
+ int|null $level,
+ string|null $fac,
+ string|null $buf
+ ): void
+
\FFI\CData|null
const rd_kafka_t*int|null
intstring|null
const char*string|null
const char*public static rd_kafka_log_syslog (
+ \FFI\CData|null $rk,
+ int|null $level,
+ string|null $fac,
+ string|null $buf
+ ): void
+
Builtin log sink: print to syslog.
+\FFI\CData|null
const rd_kafka_t*int|null
intstring|null
const char*string|null
const char*See also
+ +public static rd_kafka_mem_calloc (
+ \FFI\CData|null $rk,
+ int|null $num,
+ int|null $size
+ ): \FFI\CData|object|string|null
+
Allocate and zero memory using the same allocator librdkafka uses.
+This is typically an abstraction for the calloc(3) call and makes sure the application can use the same memory allocator as librdkafka for allocating pointers that are used by librdkafka.
+rk
can be set to return memory allocated by a specific rk
instance otherwise pass NULL for rk
.
\FFI\CData|null
rd_kafka_t*int|null
size_tint|null
size_t\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_mem_free (
+ \FFI\CData|null $rk,
+ \FFI\CData|object|string|null $ptr
+ ): void
+
Free pointer returned by librdkafka.
+This is typically an abstraction for the free(3) call and makes sure the application can use the same memory allocator as librdkafka for freeing pointers returned by librdkafka.
+In standard setups it is usually not necessary to use this interface rather than the free(3) functione.
+rk
must be set for memory returned by APIs that take an rk
argument, for other APIs pass NULL for rk
.
\FFI\CData|null
rd_kafka_t*\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_mem_malloc (
+ \FFI\CData|null $rk,
+ int|null $size
+ ): \FFI\CData|object|string|null
+
Allocate memory using the same allocator librdkafka uses.
+This is typically an abstraction for the malloc(3) call and makes sure the application can use the same memory allocator as librdkafka for allocating pointers that are used by librdkafka.
+rk
can be set to return memory allocated by a specific rk
instance otherwise pass NULL for rk
.
\FFI\CData|null
rd_kafka_t*int|null
size_t\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_memberid (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Returns this client's broker-assigned group member id.
+\FFI\CData|null
const rd_kafka_t* - )\FFI\CData|null
char* - An allocated string containing the current broker-assigned group member id, or NULL if not available. The application must free the string with free()
or rd_kafka_mem_free()See also
+ +public static rd_kafka_message_broker_id (
+ \FFI\CData|null $rkmessage
+ ): int|null
+
Returns the broker id of the broker the message was produced to or fetched from.
+ +\FFI\CData|null
const rd_kafka_message_t* - )int|null
int32_t - a broker id if known, else -1.See also
+ +public static rd_kafka_message_destroy (
+ \FFI\CData|null $rkmessage
+ ): void
+
\FFI\CData|null
rd_kafka_message_t*public static rd_kafka_message_detach_headers (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $hdrsp
+ ): int
+
Get the message header list and detach the list from the message making the application the owner of the headers. The application must eventually destroy the headers using rd_kafka_headers_destroy(). The message's headers will be set to NULL.
+Otherwise same semantics as rd_kafka_message_headers()
+\FFI\CData|null
rd_kafka_message_t*\FFI\CData|null
rd_kafka_headers_t**int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_message_errstr (
+ \FFI\CData|null $rkmessage
+ ): string|null
+
Returns the error string for an errored rd_kafka_message_t or NULL if there was no error.
+\FFI\CData|null
const rd_kafka_message_t* - )string|null
const char*See also
+ +public static rd_kafka_message_headers (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $hdrsp
+ ): int
+
Get the message header list.
+The returned pointer in *hdrsp
is associated with the rkmessage
and must not be used after destruction of the message object or the header list is replaced with rd_kafka_message_set_headers().
\FFI\CData|null
const rd_kafka_message_t*\FFI\CData|null
rd_kafka_headers_t**int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if headers were returned, RD_KAFKA_RESP_ERR__NOENT if the message has no headers, or another error code if the headers could not be parsed.See also
+ +public static rd_kafka_message_latency (
+ \FFI\CData|null $rkmessage
+ ): int|null
+
Returns the latency for a produced message measured from the produce() call.
+ +\FFI\CData|null
const rd_kafka_message_t* - )int|null
int64_t - the latency in microseconds, or -1 if not available.See also
+ +public static rd_kafka_message_leader_epoch (
+ \FFI\CData|null $rkmessage
+ ): int|null
+
\FFI\CData|null
const rd_kafka_message_t* - )int|null
int32_t - the message’s partition leader epoch at the time the message was fetched and if known, else -1.See also
+ +public static rd_kafka_message_set_headers (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $hdrs
+ ): void
+
Replace the message's current headers with a new list.
+ +\FFI\CData|null
rd_kafka_message_t* - The message to set headers.\FFI\CData|null
rd_kafka_headers_t* - New header list. The message object assumes ownership of the list, the list will be destroyed automatically with the message object. The new headers list may be updated until the message object is passed or returned to librdkafka.See also
+ +public static rd_kafka_message_status (
+ \FFI\CData|null $rkmessage
+ ): int
+
Returns the message's persistence status in the topic log.
+\FFI\CData|null
const rd_kafka_message_t* - )int
rd_kafka_msg_status_tSee also
+ +public static rd_kafka_message_timestamp (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $tstype
+ ): int|null
+
Returns the message timestamp for a consumed message.
+The timestamp is the number of milliseconds since the epoch (UTC).
+tstype
(if not NULL) is updated to indicate the type of timestamp.
\FFI\CData|null
const rd_kafka_message_t*\FFI\CData|null
rd_kafka_timestamp_type_t*int|null
int64_t - message timestamp, or -1 if not available.See also
+ +public static rd_kafka_metadata (
+ \FFI\CData|null $rk,
+ int|null $all_topics,
+ \FFI\CData|null $only_rkt,
+ \FFI\CData|null $metadatap,
+ int|null $timeout_ms
+ ): int
+
Request Metadata from broker.
+Parameters:
+all_topics
if non-zero: request info about all topics in cluster, if zero: only request info about locally known topics.only_rkt
only request info about this topicmetadatap
pointer to hold metadata result. The *metadatap
pointer must be released with rd_kafka_metadata_destroy().timeout_ms
maximum response time before failing.all_topics
is non-zero the Metadata response information may trigger a re-join if any subscribed topics have changed partition count or existence state.\FFI\CData|null
rd_kafka_t*int|null
int\FFI\CData|null
rd_kafka_topic_t*\FFI\CData|null
const struct rd_kafka_metadata**int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success (in which case *metadatap) will be set, else RD_KAFKA_RESP_ERR__TIMED_OUT on timeout or other error code on error.See also
+ +public static rd_kafka_metadata_destroy (
+ \FFI\CData|\Closure $metadata
+ ): void
+
\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_metadata*)(rd_kafka_t*, int, rd_kafka_topic_t*, const struct rd_kafka_metadata**, int)public static rd_kafka_mock_broker_error_stack_cnt (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $ApiKey,
+ \FFI\CData|null $cntp
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
int16_t\FFI\CData|null
size_t*int
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_push_request_error_rtts (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $ApiKey,
+ int|null $cnt,
+ mixed $args
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
int16_tint|null
size_tmixed
int
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_push_request_errors (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $ApiKey,
+ int|null $cnt,
+ mixed $args
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
int16_tint|null
size_tmixed
int
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_down (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_rack (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ string|null $rack
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tstring|null
const char*int
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_rtt (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $rtt_ms
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
intint
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_up (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_clear_request_errors (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tpublic static rd_kafka_mock_clear_requests (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_cluster_bootstraps (
+ \FFI\CData|null $mcluster
+ ): string|null
+
\FFI\CData|null
const rd_kafka_mock_cluster_t*string|null
const char*public static rd_kafka_mock_cluster_destroy (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_cluster_handle (
+ \FFI\CData|null $mcluster
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_mock_cluster_t*\FFI\CData|null
rd_kafka_t*public static rd_kafka_mock_cluster_new (
+ \FFI\CData|null $rk,
+ int|null $broker_cnt
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t*int|null
int\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_coordinator_set (
+ \FFI\CData|null $mcluster,
+ string|null $key_type,
+ string|null $key,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*string|null
const char*int|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_get_requests (
+ \FFI\CData|null $mcluster,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_mock_cluster_t*\FFI\CData|null
size_t*\FFI\CData|null
rd_kafka_mock_request_t**public static rd_kafka_mock_partition_set_follower (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
int32_tint|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_partition_set_follower_wmarks (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition,
+ int|null $lo,
+ int|null $hi
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
int32_tint|null
int64_tint|null
int64_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_partition_set_leader (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
int32_tint|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_push_request_errors (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey,
+ int|null $cnt,
+ mixed $args
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tint|null
size_tmixed
public static rd_kafka_mock_push_request_errors_array (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey,
+ int|null $cnt,
+ \FFI\CData|null $errors
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tint|null
size_t\FFI\CData|null
const rd_kafka_resp_err_t*public static rd_kafka_mock_request_api_key (
+ \FFI\CData|null $mreq
+ ): int|null
+
\FFI\CData|null
rd_kafka_mock_request_t*int|null
int16_tpublic static rd_kafka_mock_request_destroy (
+ \FFI\CData|null $mreq
+ ): void
+
\FFI\CData|null
rd_kafka_mock_request_t*public static rd_kafka_mock_request_id (
+ \FFI\CData|null $mreq
+ ): int|null
+
\FFI\CData|null
rd_kafka_mock_request_t*int|null
int32_tpublic static rd_kafka_mock_request_timestamp (
+ \FFI\CData|null $mreq
+ ): int|null
+
\FFI\CData|null
rd_kafka_mock_request_t*int|null
int64_tpublic static rd_kafka_mock_set_apiversion (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey,
+ int|null $MinVersion,
+ int|null $MaxVersion
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tint|null
int16_tint|null
int16_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_start_request_tracking (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_stop_request_tracking (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_topic_create (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition_cnt,
+ int|null $replication_factor
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
intint|null
intint
rd_kafka_resp_err_tpublic static rd_kafka_mock_topic_set_error (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int $err
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int
rd_kafka_resp_err_tpublic static rd_kafka_msg_partitioner_consistent (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent partitioner.
+Uses consistent hashing to map identical keys onto identical partitions.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a “random” partition between 0 and partition_cnt
- 1 based on the CRC value of the keySee also
+ +public static rd_kafka_msg_partitioner_consistent_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent-Random partitioner.
+This is the default partitioner. Uses consistent hashing to map identical keys onto identical partitions, and messages without keys will be assigned via the random partitioner.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a “random” partition between 0 and partition_cnt
- 1 based on the CRC value of the key (if provided)See also
+ +public static rd_kafka_msg_partitioner_fnv1a (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
FNV-1a partitioner.
+Uses consistent hashing to map identical keys onto identical partitions using FNV-1a hashing.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_fnv1a_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent-Random FNV-1a partitioner.
+Uses consistent hashing to map identical keys onto identical partitions using FNV-1a hashing. Messages without keys will be assigned via the random partitioner.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_murmur2 (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Murmur2 partitioner (Java compatible).
+Uses consistent hashing to map identical keys onto identical partitions using Java-compatible Murmur2 hashing.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_murmur2_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent-Random Murmur2 partitioner (Java compatible).
+Uses consistent hashing to map identical keys onto identical partitions using Java-compatible Murmur2 hashing. Messages without keys will be assigned via the random partitioner.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Random partitioner.
+Will try not to return unavailable partitions.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a random partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_name (
+ \FFI\CData|null $rk
+ ): string|null
+
\FFI\CData|null
const rd_kafka_t*string|null
const char*public static rd_kafka_new (
+ int $type,
+ \FFI\CData|null $conf,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Creates a new Kafka handle and starts its operation according to the specified type
(RD_KAFKA_CONSUMER
or RD_KAFKA_PRODUCER
).
conf
is an optional struct created with rd_kafka_conf_new()
that will be used instead of the default configuration. The conf
object is freed by this function on success and must not be used or destroyed by the application subsequently. See rd_kafka_conf_set()
et.al for more information.
errstr
must be a pointer to memory of at least size errstr_size
where rd_kafka_new()
may write a human readable error message in case the creation of a new handle fails. In which case the function returns NULL.
RD_KAFKA_CONSUMER
rd_kafka_t handle is created it may either operate in the legacy simple consumer mode using the rd_kafka_consume_start() interface, or the High-level KafkaConsumer API. int
rd_kafka_type_t\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|null
char*int|null
size_t\FFI\CData|null
rd_kafka_t* - The Kafka handle on success or NULL on error (see errstr
)See also
+ +public static rd_kafka_oauthbearer_set_token (
+ \FFI\CData|null $rk,
+ string|null $token_value,
+ int|null $md_lifetime_ms,
+ string|null $md_principal_name,
+ \FFI\CData|null $extensions,
+ int|null $extension_size,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set SASL/OAUTHBEARER token and metadata.
+ +The SASL/OAUTHBEARER token refresh callback or event handler should invoke this method upon success. The extension keys must not include the reserved key "`auth`", and all extension keys and values must conform to the required format as per https://tools.ietf.org/html/rfc7628#section-3.1:
+key = 1*(ALPHA) +value = *(VCHAR / SP / HTAB / CR / LF ) ++
\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - the mandatory token value to set, often (but not necessarily) a JWS compact serialization as per https://tools.ietf.org/html/rfc7515#section-3.1.int|null
int64_t - when the token expires, in terms of the number of milliseconds since the epoch.string|null
const char* - the mandatory Kafka principal name associated with the token.\FFI\CData|null
const char** - optional SASL extensions key-value array with extensions_size
elements (number of keys * 2), where [i] is the key and [i+1] is the key’s value, to be communicated to the broker as additional key-value pairs during the initial client response as per https://tools.ietf.org/html/rfc7628#section-3.1. The key-value pairs are copied.int|null
size_t - the number of SASL extension keys plus values, which must be a non-negative multiple of 2.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR
on success, otherwise errstr
set and:RD_KAFKA_RESP_ERR__INVALID_ARG
if any of the arguments are invalid;RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED
if SASL/OAUTHBEARER is not supported by this build;RD_KAFKA_RESP_ERR__STATE
if SASL/OAUTHBEARER is supported but is not configured as the client’s authentication mechanism.See also
+ +public static rd_kafka_oauthbearer_set_token_failure (
+ \FFI\CData|null $rk,
+ string|null $errstr
+ ): int
+
SASL/OAUTHBEARER token refresh failure indicator.
+ +The SASL/OAUTHBEARER token refresh callback or event handler should invoke this method upon failure.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - mandatory human readable error reason for failing to acquire a token.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR
on success, otherwise:RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED
if SASL/OAUTHBEARER is not supported by this build;RD_KAFKA_RESP_ERR__STATE
if SASL/OAUTHBEARER is supported but is not configured as the client’s authentication mechanism,RD_KAFKA_RESP_ERR__INVALID_ARG
if no error string is supplied.See also
+ +public static rd_kafka_offset_store (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset
+ ): int
+
Store offset offset
+ 1 for topic rkt
partition partition
.
The offset
+ 1 will be committed (written) to broker (or file) according to
or manual offset-less commit()auto.commit.interval.ms
enable.auto.offset.store
must be set to "false" when using this API.\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error.See also
+ +public static rd_kafka_offset_store_message (
+ \FFI\CData|null $rkmessage
+ ): \FFI\CData|null
+
Store offset +1 for the consumed message.
+The message offset + 1 will be committed to broker according to
or manual offset-less commit()auto.commit.interval.ms
enable.auto.offset.store
must be set to "false" when using this API.\FFI\CData|null
rd_kafka_message_t* - )\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_offsets_for_times (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ int|null $timeout_ms
+ ): int
+
Look up the offsets for the given partitions by timestamp.
+The returned offset for each partition is the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition.
+The timestamps to query are represented as offset
in offsets
on input, and offset
will contain the offset on output.
The function will block for at most timeout_ms
milliseconds.
rd_kafka_topic_partition_t.err
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if offsets were be queried (do note that per-partition errors might be set), RD_KAFKA_RESP_ERR__TIMED_OUT if not all offsets could be fetched within timeout_ms
, RD_KAFKA_RESP_ERR__INVALID_ARG if the offsets
list is empty, RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION if all partitions are unknown, RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE if unable to query leaders for the given partitions.See also
+ +public static rd_kafka_offsets_store (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets
+ ): int
+
Store offsets for next auto-commit for one or more partitions.
+The offset will be committed (written) to the offset store according to
or manual offset-less commit().auto.commit.interval.ms
Per-partition success/error status propagated through each partition's .err for all return values (even NO_ERROR) except INVALID_ARG.
.offset field is stored as is, it will NOT be + 1.enable.auto.offset.store
must be set to "false" when using this API.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on (partial) success, or RD_KAFKA_RESP_ERR__INVALID_ARG if enable.auto.offset.store
is true, or RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION or RD_KAFKA_RESP_ERR__STATE if none of the offsets could be stored.See also
+ +public static rd_kafka_opaque (
+ \FFI\CData|null $rk
+ ): \FFI\CData|object|string|null
+
\FFI\CData|null
const rd_kafka_t*\FFI\CData|object|string|null
void*public static rd_kafka_outq_len (
+ \FFI\CData|null $rk
+ ): int|null
+
Returns the current out queue length.
+The out queue length is the sum of:
+An application should wait for the return value of this function to reach zero before terminating to make sure outstanding messages, requests (such as offset commits), callbacks and events are fully processed. See rd_kafka_flush().
+ +\FFI\CData|null
rd_kafka_t* - )int|null
int - number of messages and events waiting in queues.See also
+ +public static rd_kafka_pause_partitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Pause producing or consumption for the provided list of partitions.
+Success or error is returned per-partition err
in the partitions
list.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_plugin_f_conf_init_t (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $plug_opaquep,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Plugin's configuration initializer method called each time the library is referenced from configuration (even if previously loaded by another client instance).
+conf_init
\FFI\CData|null
rd_kafka_conf_t* - Configuration set up to this point.\FFI\CData|object|string|null
void** - Plugin can set this pointer to a per-configuration opaque pointer.\FFI\CData|null
char* - String buffer of size errstr_size
where plugin must write a human readable error string in the case the initializer fails (returns non-zero). - Maximum space (including \0) in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error.See also
+ +public static rd_kafka_poll (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): int|null
+
Polls the provided kafka handle for events.
+Events will cause application-provided callbacks to be called.
+The timeout_ms
argument specifies the maximum amount of time (in milliseconds) that the call will block waiting for events. For non-blocking calls, provide 0 as timeout_ms
. To wait indefinitely for an event, provide -1.
Events:
+\FFI\CData|null
rd_kafka_t*int|null
intint|null
int - the number of events served.See also
+ +public static rd_kafka_poll_set_consumer (
+ \FFI\CData|null $rk
+ ): int
+
Redirect the main (rd_kafka_poll()) queue to the KafkaConsumer's queue (rd_kafka_consumer_poll()).
+\FFI\CData|null
rd_kafka_t* - )int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_position (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Retrieve current positions (offsets) for topics+partitions.
+The offset
field of each requested partition will be set to the offset of the last consumed message + 1, or RD_KAFKA_OFFSET_INVALID in case there was no previous message.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success in which case the offset
or err
field of each partitions’
element is filled in with the stored offset, or a partition specific error. Else returns an error code.See also
+ +public static rd_kafka_produce (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $msgflags,
+ \FFI\CData|object|string|null $payload,
+ int|null $len,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Produce and send a single message to broker.
+rkt
is the target topic which must have been previously created with rd_kafka_topic_new()
.
rd_kafka_produce()
is an asynchronous non-blocking API. See rd_kafka_conf_set_dr_msg_cb
on how to setup a callback to be called once the delivery status (success or failure) is known. The delivery report is triggered by the application calling rd_kafka_poll()
(at regular intervals) or rd_kafka_flush()
(at termination).
Since producing is asynchronous, you should call rd_kafka_flush()
before you destroy the producer. Otherwise, any outstanding messages will be silently discarded.
When temporary errors occur, librdkafka automatically retries to produce the messages. Retries are triggered after retry.backoff.ms and when the leader broker for the given partition is available. Otherwise, librdkafka falls back to polling the topic metadata to monitor when a new leader is elected (see the topic.metadata.refresh.fast.interval.ms and topic.metadata.refresh.interval.ms configurations) and then performs a retry. A delivery error will occur if the message could not be produced within message.timeout.ms.
+See the "Message reliability" chapter in INTRODUCTION.md for more information.
+partition
is the target partition, either:
msgflags
is zero or more of the following flags OR:ed together: RD_KAFKA_MSG_F_BLOCK - block produce*
() call if queue.buffering.max.messages
or queue.buffering.max.kbytes
are exceeded. Messages are considered in-queue from the point they are accepted by produce() until their corresponding delivery report callback/event returns. It is thus a requirement to call rd_kafka_poll() (or equiv.) from a separate thread when F_BLOCK is used. See WARNING on RD_KAFKA_MSG_F_BLOCK
above.
RD_KAFKA_MSG_F_FREE - rdkafka will free(3) payload
when it is done with it. RD_KAFKA_MSG_F_COPY - the payload
data will be copied and the payload
pointer will not be used by rdkafka after the call returns. RD_KAFKA_MSG_F_PARTITION - produce_batch() will honour per-message partition, either set manually or by the configured partitioner.
.._F_FREE and .._F_COPY are mutually exclusive. If neither of these are set, the caller must ensure that the memory backing payload
remains valid and is not modified or reused until the delivery callback is invoked. Other buffers passed to rd_kafka_produce()
don't have this restriction on reuse, i.e. the memory backing the key or the topic name may be reused as soon as rd_kafka_produce()
returns.
If the function returns -1 and RD_KAFKA_MSG_F_FREE was specified, then the memory associated with the payload is still the caller's responsibility.
+payload
is the message payload of size len
bytes.
key
is an optional message key of size keylen
bytes, if non-NULL it will be passed to the topic partitioner as well as be sent with the message to the broker and passed on to the consumer.
msg_opaque
is an optional application-provided per-message opaque pointer that will provided in the message's delivery report callback (dr_msg_cb
or dr_cb
) and the rd_kafka_message_t
_private
field.
transactional.id
is configured) producing is only allowed during an on-going transaction, namely after rd_kafka_begin_transaction() has been called.errno
to rdkafka error code. \FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|object|string|null
void*int|null
size_t\FFI\CData|object|string|null
const void*int|null
size_t\FFI\CData|object|string|null
void*int|null
int - 0 on success or -1 on error in which case errno is set accordingly:partition
is unknown in the Kafka cluster. (RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION)See also
+ +public static rd_kafka_produce_batch (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $msgflags,
+ \FFI\CData|null $rkmessages,
+ int|null $message_cnt
+ ): int|null
+
Produce multiple messages.
+If partition is RD_KAFKA_PARTITION_UA the configured partitioner will be run for each message (slower), otherwise the messages will be enqueued to the specified partition directly (faster).
+The messages are provided in the array rkmessages
of count message_cnt
elements. The partition
and msgflags
are used for all provided messages.
Honoured rkmessages
[] fields are:
message_cnt
.RD_KAFKA_MSG_F_PARTITION
is set in msgflags
, the
.partition field of the rkmessages
is used instead of partition
.rkmessages
. \FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|null
rd_kafka_message_t*int|null
intint|null
int - the number of messages succesfully enqueued for producing.See also
+ +public static rd_kafka_producev (
+ \FFI\CData|null $rk,
+ mixed $args
+ ): int
+
Produce and send a single message to broker.
+The message is defined by a va-arg list using rd_kafka_vtype_t
tag tuples which must be terminated with a single RD_KAFKA_V_END
.
\FFI\CData|null
rd_kafka_t*mixed
int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR
on success, else an error code as described in rd_kafka_produce(). RD_KAFKA_RESP_ERR__CONFLICT
is returned if _V_HEADER and _V_HEADERS are mixed.See also
+ +public static rd_kafka_produceva (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $vus,
+ int|null $cnt
+ ): \FFI\CData|null
+
Produce and send a single message to broker.
+The message is defined by an array of rd_kafka_vu_t
of count cnt
.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_vu_t*int|null
size_t\FFI\CData|null
rd_kafka_error_t* - an error object on failure or NULL on success. See rd_kafka_producev() for specific error codes.See also
+ +public static rd_kafka_purge (
+ \FFI\CData|null $rk,
+ int|null $purge_flags
+ ): int
+
Purge messages currently handled by the producer instance.
+ +The application will need to call rd_kafka_poll() or rd_kafka_flush() afterwards to serve the delivery report callbacks of the purged messages.
+Messages purged from internal queues fail with the delivery report error code set to RD_KAFKA_RESP_ERR__PURGE_QUEUE, while purged messages that are in-flight to or from the broker will fail with the error code set to RD_KAFKA_RESP_ERR__PURGE_INFLIGHT.
+\FFI\CData|null
rd_kafka_t* - Client instance.int|null
int - Tells which messages to purge and how.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, RD_KAFKA_RESP_ERR__INVALID_ARG if the purge
flags are invalid or unknown, RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED if called on a non-producer client instance.See also
+ +public static rd_kafka_query_watermark_offsets (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ int|null $partition,
+ \FFI\CData|null $low,
+ \FFI\CData|null $high,
+ int|null $timeout_ms
+ ): int
+
Query broker for low (oldest/beginning) and high (newest/end) offsets for partition.
+Offsets are returned in *low
and *high
respectively.
\FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int32_t\FFI\CData|null
int64_t*\FFI\CData|null
int64_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure.See also
+ +public static rd_kafka_queue_cb_event_enable (
+ \FFI\CData|null $rkqu,
+ \FFI\CData|\Closure $event_cb,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Enable callback event triggering for queue.
+The callback will be called from an internal librdkafka thread when a new element is enqueued on a previously empty queue.
+To remove event triggering call with event_cb
= NULL.
The qev_opaque
is passed to the callback's qev_opaque
argument.
\FFI\CData|null
rd_kafka_queue_t*\FFI\CData|\Closure
void()(rd_kafka_t, void*)\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_queue_destroy (
+ \FFI\CData|null $rkqu
+ ): void
+
Destroy a queue, purging all of its enqueued messages.
+ +\FFI\CData|null
rd_kafka_queue_t* - )See also
+ +public static rd_kafka_queue_forward (
+ \FFI\CData|null $src,
+ \FFI\CData|null $dst
+ ): void
+
Forward/re-route queue src
to dst
. If dst
is NULL
the forwarding is removed.
The internal refcounts for both queues are increased.
+dst
is NULL or not, after calling this function, src
will not forward it's fetch queue to the consumer queue. \FFI\CData|null
rd_kafka_queue_t*\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_queue_get_background (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
The background thread queue provides the application with an automatically polled queue that triggers the event callback in a background thread, this background thread is completely managed by librdkafka.
+The background thread queue is automatically created if a generic event handler callback is configured with rd_kafka_conf_set_background_event_cb() or if rd_kafka_queue_get_background() is called.
+The background queue is polled and served by librdkafka and MUST NOT be polled, forwarded, or otherwise managed by the application, it may only be used as the destination queue passed to queue-enabled APIs, such as the Admin API.
+Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the background thread queue, or NULL if the background queue is not enabled.See also
+ +public static rd_kafka_queue_get_consumer (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the librdkafka consumer queue. This is the queue served by rd_kafka_consumer_poll().See also
+ +public static rd_kafka_queue_get_main (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+ +\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the main librdkafka event queue. This is the queue served by rd_kafka_poll().See also
+ +public static rd_kafka_queue_get_partition (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ int|null $partition
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int32_t\FFI\CData|null
rd_kafka_queue_t* - a reference to the partition’s queue, or NULL if partition is invalid.See also
+ +public static rd_kafka_queue_get_sasl (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the SASL callback queue, if a SASL mechanism with callbacks is configured (currently only OAUTHBEARER), else returns NULL.See also
+ +public static rd_kafka_queue_io_event_enable (
+ \FFI\CData|null $rkqu,
+ int|null $fd,
+ \FFI\CData|object|string|null $payload,
+ int|null $size
+ ): void
+
Enable IO event triggering for queue.
+To ease integration with IO based polling loops this API allows an application to create a separate file-descriptor that librdkafka will write payload
(of size size
) to whenever a new element is enqueued on a previously empty queue.
To remove event triggering call with fd
= -1.
librdkafka will maintain a copy of the payload
.
\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|object|string|null
const void*int|null
size_tSee also
+ +public static rd_kafka_queue_length (
+ \FFI\CData|null $rkqu
+ ): int|null
+
\FFI\CData|null
rd_kafka_queue_t* - )int|null
size_t - the current number of elements in queue.See also
+ +public static rd_kafka_queue_new (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Create a new message queue.
+See rd_kafka_consume_start_queue(), rd_kafka_consume_queue(), et.al.
+ +\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_queue_poll (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Poll a queue for an event for max timeout_ms
.
\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|null
rd_kafka_event_t* - an event, or NULL.See also
+ +public static rd_kafka_queue_poll_callback (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms
+ ): int|null
+
Poll a queue for events served through callbacks for max timeout_ms
.
\FFI\CData|null
rd_kafka_queue_t*int|null
intint|null
int - the number of events served.See also
+ +public static rd_kafka_queue_yield (
+ \FFI\CData|null $rkqu
+ ): void
+
Cancels the current rd_kafka_queue_poll() on rkqu
.
An application may use this from another thread to force an immediate return to the calling code (caller of rd_kafka_queue_poll()). Must not be used from signal handlers since that may cause deadlocks.
+ +\FFI\CData|null
rd_kafka_queue_t* - )See also
+ +public static rd_kafka_rebalance_protocol (
+ \FFI\CData|null $rk
+ ): string|null
+
The rebalance protocol currently in use. This will be "NONE" if the consumer has not (yet) joined a group, else it will match the rebalance protocol ("EAGER", "COOPERATIVE") of the configured and selected assignor(s). All configured assignors must have the same protocol type, meaning online migration of a consumer group from using one protocol to another (in particular upgading from EAGER to COOPERATIVE) without a restart is not currently supported.
+ +\FFI\CData|null
rd_kafka_t* - )string|null
const char* - NULL on error, or one of “NONE”, “EAGER”, “COOPERATIVE” on success.See also
+ +public static rd_kafka_resume_partitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Resume producing consumption for the provided list of partitions.
+Success or error is returned per-partition err
in the partitions
list.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_sasl_background_callbacks_enable (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Enable SASL OAUTHBEARER refresh callbacks on the librdkafka background thread.
+This serves as an alternative for applications that do not call rd_kafka_poll() (et.al.) at regular intervals (or not at all), as a means of automatically trigger the refresh callbacks, which are needed to initiate connections to the brokers in the case a custom OAUTHBEARER refresh callback is configured.
+ +\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on error.See also
+ +public static rd_kafka_sasl_set_credentials (
+ \FFI\CData|null $rk,
+ string|null $username,
+ string|null $password
+ ): \FFI\CData|null
+
Sets SASL credentials used for SASL PLAIN and SCRAM mechanisms by this Kafka client.
+This function sets or resets the SASL username and password credentials used by this Kafka client. The new credentials will be used the next time this client needs to authenticate to a broker. This function will not disconnect existing connections that might have been made using the old credentials.
+\FFI\CData|null
rd_kafka_t*string|null
const char*string|null
const char*\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on error.See also
+ +public static rd_kafka_seek (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset,
+ int|null $timeout_ms
+ ): int
+
Seek consumer for topic+partition to offset
which is either an absolute or logical offset.
If timeout_ms
is specified (not 0) the seek call will wait this long for the consumer to update its fetcher state for the given partition with the new offset. This guarantees that no previously fetched messages for the old offset (or fetch position) will be passed to the application.
If the timeout is reached the internal state will be unknown to the caller and this function returns RD_KAFKA_RESP_ERR__TIMED_OUT
.
If timeout_ms
is 0 it will initiate the seek but return immediately without any error reporting (e.g., async).
This call will purge all pre-fetched messages for the given partition, which may be up to queued.max.message.kbytes
in size. Repeated use of seek may thus lead to increased network usage as messages are re-fetched from the broker.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_tint|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__NO_ERROR
on success else an error code.See also
+ +public static rd_kafka_seek_partitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Seek consumer for partitions in partitions
to the per-partition offset in the .offset field of
partitions
.
The offset may be either absolute (>= 0) or a logical offset.
+If timeout_ms
is specified (not 0) the seek call will wait this long for the consumer to update its fetcher state for the given partition with the new offset. This guarantees that no previously fetched messages for the old offset (or fetch position) will be passed to the application.
If the timeout is reached the internal state will be unknown to the caller and this function returns RD_KAFKA_RESP_ERR__TIMED_OUT
.
If timeout_ms
is 0 it will initiate the seek but return immediately without any error reporting (e.g., async).
This call will purge all pre-fetched messages for the given partition, which may be up to queued.max.message.kbytes
in size. Repeated use of seek may thus lead to increased network usage as messages are re-fetched from the broker.
Individual partition errors are reported in the per-partition .err field of
partitions
.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
int\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_send_offsets_to_transaction (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ \FFI\CData|null $cgmetadata,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Sends a list of topic partition offsets to the consumer group coordinator for cgmetadata
, and marks the offsets as part part of the current transaction. These offsets will be considered committed only if the transaction is committed successfully.
The offsets should be the next message your application will consume, i.e., the last processed message's offset + 1 for each partition. Either track the offsets manually during processing or use rd_kafka_position() (on the consumer) to get the current offsets for the partitions assigned to the consumer.
+Use this method at the end of a consume-transform-produce loop prior to committing the transaction with rd_kafka_commit_transaction().
+ +enable.auto.commit
to false on the consumer).offsets
will be ignored, if there are no valid offsets in offsets
the function will return NULL and no action will be taken.offsets
and cgmetadata
parameters. Failure to do so risks inconsistent state between what is actually included in the transaction and what the application thinks is included in the transaction.\FFI\CData|null
rd_kafka_t* - Producer instance.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - List of offsets to commit to the consumer group upon successful commit of the transaction. Offsets should be the next message to consume, e.g., last processed message + 1.\FFI\CData|null
const rd_kafka_consumer_group_metadata_t* - The current consumer group metadata as returned by rd_kafka_consumer_group_metadata() on the consumer instance the provided offsets were consumed from.int|null
int - Maximum time allowed to register the offsets on the broker.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether an abortable or fatal error has been raised by calling rd_kafka_error_txn_requires_abort() or rd_kafka_error_is_fatal() respectively. Error codes: RD_KAFKA_RESP_ERR__STATE if not currently in a transaction, RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH if the current producer transaction has been fenced by a newer producer instance, RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED if the producer is no longer authorized to perform transactional operations, RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED if the producer is not authorized to write the consumer offsets to the group coordinator, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, or if the consumer_group_id
or offsets
are empty. Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_set_log_level (
+ \FFI\CData|null $rk,
+ int|null $level
+ ): void
+
Specifies the maximum logging level emitted by internal kafka logging and debugging.
+"log_level"
configuration property instead."debug"
configuration property is set the log level is automatically adjusted to LOG_DEBUG
(7). \FFI\CData|null
rd_kafka_t*int|null
intSee also
+ +public static rd_kafka_set_log_queue (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkqu
+ ): int
+
Forward librdkafka logs (and debug) to the specified queue for serving with one of the ..poll() calls.
+This allows an application to serve log callbacks (log_cb
) in its thread of choice.
log.queue
MUST also be set to true.\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_queue_t* - Queue to forward logs to. If the value is NULL the logs are forwarded to the main queue.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error, eg RD_KAFKA_RESP_ERR__NOT_CONFIGURED when log.queue is not set to true.See also
+ +public static rd_kafka_set_logger (
+ \FFI\CData|null $rk,
+ \FFI\CData|\Closure $func
+ ): void
+
Set logger function.
+The default is to print to stderr, but a syslog logger is also available, see rd_kafka_log_(print|syslog) for the builtin alternatives. Alternatively the application may provide its own logger callback. Or pass 'func' as NULL to disable logging.
+rk
may be passed as NULL in the callback. \FFI\CData|null
rd_kafka_t*\FFI\CData|\Closure
void()(const rd_kafka_t, int, const char*, const char*)See also
+ +public static rd_kafka_subscribe (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topics
+ ): int
+
Subscribe to topic set using balanced consumer groups.
+Wildcard (regex) topics are supported: any topic name in the topics
list that is prefixed with "^"
will be regex-matched to the full list of topics in the cluster and matching topics will be added to the subscription list.
The full topic list is retrieved every topic.metadata.refresh.interval.ms
to pick up new or delete topics that match the subscription. If there is any change to the matched topics the consumer will immediately rejoin the group with the updated set of subscribed topics.
Regex and full topic names can be mixed in topics
.
.topic field is used in the supplied topics
list, all other fields are ignored.session.timeout.ms
* 2 or more to complete.topics
. The error will be RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART for non-existent topics, and RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED for unauthorized topics. The consumer error will be raised through rd_kafka_consumer_poll() (et.al.) with the rd_kafka_message_t.err
field set to one of the error codes mentioned above. The subscribe function itself is asynchronous and will not return an error on unavailable topics.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__INVALID_ARG if list is empty, contains invalid topics or regexes or duplicate entries, RD_KAFKA_RESP_ERR__FATAL if the consumer has raised a fatal error.See also
+ +public static rd_kafka_subscription (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topics
+ ): int
+
Returns the current topic subscription.
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t**int
rd_kafka_resp_err_t - An error code on failure, otherwise topic
is updated to point to a newly allocated topic list (possibly empty).See also
+ +public static rd_kafka_test_fatal_error (
+ \FFI\CData|null $rk,
+ int $err,
+ string|null $reason
+ ): int
+
Trigger a fatal error for testing purposes.
+Since there is no practical way to trigger real fatal errors in the idempotent producer, this method allows an application to trigger fabricated fatal errors in tests to check its error handling code.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.int
rd_kafka_resp_err_t - The underlying error code.string|null
const char* - A human readable error reason. Will be prefixed with “test_fatal_error: ” to differentiate from real fatal errors.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if a fatal error was triggered, or RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS if a previous fatal error has already been triggered.See also
+ +public static rd_kafka_thread_cnt ( ): int|null
+
Retrieve the current number of threads in use by librdkafka.
+Used by regression tests.
+ +int|null
int - )See also
+ +public static rd_kafka_topic_conf_destroy (
+ \FFI\CData|null $topic_conf
+ ): void
+
\FFI\CData|null
rd_kafka_topic_conf_t*public static rd_kafka_topic_conf_dump (
+ \FFI\CData|null $conf,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Dump the topic configuration properties and values of conf
to an array with "key", "value" pairs.
The number of entries in the array is returned in *cntp
.
The dump must be freed with rd_kafka_conf_dump_free()
.
\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|null
size_t*\FFI\CData|null
const char**See also
+ +public static rd_kafka_topic_conf_dup (
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_topic_conf_t*\FFI\CData|null
rd_kafka_topic_conf_t*public static rd_kafka_topic_conf_get (
+ \FFI\CData|null $conf,
+ string|null $name,
+ \FFI\CData|null $dest,
+ \FFI\CData|null $dest_size
+ ): int
+
Retrieve topic configuration value for property name
.
\FFI\CData|null
const rd_kafka_topic_conf_t*string|null
const char*\FFI\CData|null
char*\FFI\CData|null
size_t*int
rd_kafka_conf_res_tSee also
+ +public static rd_kafka_topic_conf_new ( ): \FFI\CData|null
+
Create topic configuration object.
+\FFI\CData|null
rd_kafka_topic_conf_t* - )See also
+ +public static rd_kafka_topic_conf_set (
+ \FFI\CData|null $conf,
+ string|null $name,
+ string|null $value,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets a single rd_kafka_topic_conf_t value by property name.
+topic_conf
should have been previously set up with rd_kafka_topic_conf_new()
.
\FFI\CData|null
rd_kafka_topic_conf_t*string|null
const char*string|null
const char*\FFI\CData|null
char*int|null
size_tint
rd_kafka_conf_res_t - rd_kafka_conf_res_t to indicate success or failure.See also
+ +public static rd_kafka_topic_conf_set_msg_order_cmp (
+ \FFI\CData|null $topic_conf,
+ \FFI\CData|\Closure $msg_order_cmp
+ ): void
+
Producer: Set message queueing order comparator callback.
+The callback may be called in any thread at any time, it may be called multiple times for the same message.
+Ordering comparator function constraints:
+The comparator shall compare the two messages and return:
+a
should be inserted before message b
.a
should be inserted after message b
.queuing.strategy=fifo
new messages are enqueued to the tail of the queue regardless of msg_order_cmp, but retried messages are still affected by msg_order_cmp.\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|\Closure
int()(const rd_kafka_message_t, const rd_kafka_message_t*)See also
+ +public static rd_kafka_topic_conf_set_opaque (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Sets the application's opaque pointer that will be passed to all topic callbacks as the rkt_opaque
argument.
\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_topic_conf_set_partitioner_cb (
+ \FFI\CData|null $topic_conf,
+ \FFI\CData|\Closure $partitioner
+ ): void
+
Producer: Set partitioner callback in provided topic conf object.
+The partitioner may be called in any thread at any time, it may be called multiple times for the same message/key.
+The callback's rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The callback's msg_opaque
argument is the per-message opaque passed to produce().
Partitioner function constraints:
+RD_KAFKA_PARTITION_UA
value if partitioning could not be performed. \FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|\Closure
int32_t()(const rd_kafka_topic_t, const void*, size_t, int32_t, void*, void*)See also
+ +public static rd_kafka_topic_destroy (
+ \FFI\CData|null $rkt
+ ): void
+
Loose application's topic handle refcount as previously created with rd_kafka_topic_new()
.
\FFI\CData|null
rd_kafka_topic_t* - )See also
+ +public static rd_kafka_topic_name (
+ \FFI\CData|null $rkt
+ ): string|null
+
\FFI\CData|null
const rd_kafka_topic_t*string|null
const char*public static rd_kafka_topic_new (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
Creates a new topic handle for topic named topic
.
conf
is an optional configuration for the topic created with rd_kafka_topic_conf_new()
that will be used instead of the default topic configuration. The conf
object is freed by this function and must not be used or destroyed by the application subsequently. See rd_kafka_topic_conf_set()
et.al for more information.
Topic handles are refcounted internally and calling rd_kafka_topic_new() again with the same topic name will return the previous topic handle without updating the original handle's configuration. Applications must eventually call rd_kafka_topic_destroy() for each succesfull call to rd_kafka_topic_new() to clear up resources.
+ +\FFI\CData|null
rd_kafka_t*string|null
const char*\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|null
rd_kafka_topic_t* - the new topic handle or NULL on error (use rd_kafka_errno2err() to convert system errno
to an rd_kafka_resp_err_t error code.See also
+ +public static rd_kafka_topic_opaque (
+ \FFI\CData|null $rkt
+ ): \FFI\CData|object|string|null
+
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
void*public static rd_kafka_topic_partition_available (
+ \FFI\CData|null $rkt,
+ int|null $partition
+ ): int|null
+
Check if partition is available (has a leader broker).
+ +\FFI\CData|null
const rd_kafka_topic_t*int|null
int32_tint|null
int - 1 if the partition is available, else 0.See also
+ +public static rd_kafka_topic_partition_destroy (
+ \FFI\CData|null $rktpar
+ ): void
+
Destroy a rd_kafka_topic_partition_t.
+\FFI\CData|null
rd_kafka_topic_partition_t* - )See also
+ +public static rd_kafka_topic_partition_get_leader_epoch (
+ \FFI\CData|null $rktpar
+ ): int|null
+
\FFI\CData|null
const rd_kafka_topic_partition_t* - ) - Partition object.int|null
int32_t - the offset leader epoch, if relevant and known, else -1.See also
+ +public static rd_kafka_topic_partition_list_add (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition
+ ): \FFI\CData|null
+
Add topic+partition to list.
+ +\FFI\CData|null
rd_kafka_topic_partition_list_t* - List to extendstring|null
const char* - Topic name (copied)int|null
int32_t - Partition id\FFI\CData|null
rd_kafka_topic_partition_t* - The object which can be used to fill in additionals fields.See also
+ +public static rd_kafka_topic_partition_list_add_range (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $start,
+ int|null $stop
+ ): void
+
Add range of partitions from start
to stop
inclusive.
\FFI\CData|null
rd_kafka_topic_partition_list_t* - List to extendstring|null
const char* - Topic name (copied)int|null
int32_t - Start partition of rangeint|null
int32_t - Last partition of range (inclusive)See also
+ +public static rd_kafka_topic_partition_list_copy (
+ \FFI\CData|null $src
+ ): \FFI\CData|null
+
Make a copy of an existing list.
+ +\FFI\CData|null
const rd_kafka_topic_partition_list_t* - ) - The existing list to copy.\FFI\CData|null
rd_kafka_topic_partition_list_t* - A new list fully populated to be identical to src
See also
+ +public static rd_kafka_topic_partition_list_del (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition
+ ): int|null
+
Delete partition from list.
+ +\FFI\CData|null
rd_kafka_topic_partition_list_t* - List to modifystring|null
const char* - Topic name to matchint|null
int32_t - Partition to matchint|null
int - 1 if partition was found (and removed), else 0.See also
+ +public static rd_kafka_topic_partition_list_del_by_idx (
+ \FFI\CData|null $rktparlist,
+ int|null $idx
+ ): int|null
+
Delete partition from list by elems[] index.
+ +\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
intint|null
int - 1 if partition was found (and removed), else 0.See also
+ +public static rd_kafka_topic_partition_list_destroy (
+ \FFI\CData|null $rkparlist
+ ): void
+
\FFI\CData|null
rd_kafka_topic_partition_list_t*public static rd_kafka_topic_partition_list_find (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition
+ ): \FFI\CData|null
+
Find element by topic
and partition
.
\FFI\CData|null
rd_kafka_topic_partition_list_t*string|null
const char*int|null
int32_t\FFI\CData|null
rd_kafka_topic_partition_t* - a pointer to the first matching element, or NULL if not found.See also
+ +public static rd_kafka_topic_partition_list_new (
+ int|null $size
+ ): \FFI\CData|null
+
Create a new list/vector Topic+Partition container.
+ +int|null
int - ) - Initial allocated size used when the expected number of elements is known or can be estimated. Avoids reallocation and possibly relocation of the elems array.\FFI\CData|null
rd_kafka_topic_partition_list_t* - A newly allocated Topic+Partition list.See also
+ +public static rd_kafka_topic_partition_list_set_offset (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition,
+ int|null $offset
+ ): int
+
Set offset to offset
for topic
and partition
.
\FFI\CData|null
rd_kafka_topic_partition_list_t*string|null
const char*int|null
int32_tint|null
int64_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION if partition
was not found in the list.See also
+ +public static rd_kafka_topic_partition_list_sort (
+ \FFI\CData|null $rktparlist,
+ \FFI\CData|\Closure $cmp,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Sort list using comparator cmp
.
If cmp
is NULL the default comparator will be used that sorts by ascending topic name and partition.
cmp_opaque
is provided as the cmp_opaque
argument to cmp
.
\FFI\CData|null
rd_kafka_topic_partition_list_t*\FFI\CData|\Closure
int()(const void, const void*, void*)\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_topic_partition_set_leader_epoch (
+ \FFI\CData|null $rktpar,
+ int|null $leader_epoch
+ ): void
+
Sets the offset leader epoch (use -1 to clear).
+ +\FFI\CData|null
rd_kafka_topic_partition_t* - Partition object.int|null
int32_t - Offset leader epoch, use -1 to reset.See also
+ +public static rd_kafka_topic_result_error (
+ \FFI\CData|null $topicres
+ ): int
+
Topic result provides per-topic operation result information.
+ +\FFI\CData|null
const rd_kafka_topic_result_t* - )int
rd_kafka_resp_err_t - the error code for the given topic result.See also
+ +public static rd_kafka_topic_result_error_string (
+ \FFI\CData|null $topicres
+ ): string|null
+
topicres
. \FFI\CData|null
const rd_kafka_topic_result_t* - )string|null
const char* - the human readable error string for the given topic result, or NULL if there was no error.See also
+ +public static rd_kafka_topic_result_name (
+ \FFI\CData|null $topicres
+ ): string|null
+
topicres
. \FFI\CData|null
const rd_kafka_topic_result_t* - )string|null
const char* - the name of the topic for the given topic result.See also
+ +public static rd_kafka_type (
+ \FFI\CData|null $rk
+ ): int
+
\FFI\CData|null
const rd_kafka_t*int
rd_kafka_type_tpublic static rd_kafka_unittest ( ): int|null
+
Run librdkafka's built-in unit-tests.
+ +int|null
int - ) - the number of failures, or 0 if all tests passed.See also
+ +public static rd_kafka_unsubscribe (
+ \FFI\CData|null $rk
+ ): int
+
\FFI\CData|null
rd_kafka_t*int
rd_kafka_resp_err_tpublic static rd_kafka_version ( ): int|null
+
Returns the librdkafka version as integer.
+ +int|null
int - ) - Version integer.See also
+ +public static rd_kafka_version_str ( ): string|null
+
Returns the librdkafka version as string.
+ +string|null
const char* - ) - Version stringSee also
+ +public static rd_kafka_wait_destroyed (
+ int|null $timeout_ms
+ ): int|null
+
Wait for all rd_kafka_t objects to be destroyed.
+Returns 0 if all kafka objects are now destroyed, or -1 if the timeout was reached.
+int|null
int - )int|null
intSee also
+ +public static rd_kafka_yield (
+ \FFI\CData|null $rk
+ ): void
+
Cancels the current callback dispatcher (rd_kafka_poll(), rd_kafka_consume_callback(), etc).
+A callback may use this to force an immediate return to the calling code (caller of e.g. rd_kafka_poll()) without processing any further events.
+\FFI\CData|null
rd_kafka_t* - )See also
+ +public static requireMethod (
+ string $name
+ ): void
+
Method must be supported by current binding version otherwise an exception is thrown.
+string
public static requireVersion (
+ string $operator,
+ string $version
+ ): void
+
Version must match the current binding otherwise an exception is thrown.
+string
string
public static type (
+ string|\FFI\CType $type
+ ): \FFI\CType
+
string|\FFI\CType
\FFI\CType
public static versionMatches (
+ string $operator,
+ string $version
+ ): bool
+
Whether version matches the current binding version
+string
string
bool
Class \RdKafka\FFI\LogCallbackProxy
+public __invoke (
+ \FFI\CData $rdkafka,
+ int $level,
+ string $facility,
+ string $message
+ ): void
+
\FFI\CData
int
string
string
Trait \RdKafka\FFI\Methods
+Description of librdkafka methods and constants is extracted from the official documentation.
+See also
+ +public static getFFI ( ): \FFI
+
\FFI
public static rd_kafka_version ( ): int|null
+
Returns the librdkafka version as integer.
+ +int|null
int - ) - Version integer.See also
+ +public static rd_kafka_version_str ( ): string|null
+
Returns the librdkafka version as string.
+ +string|null
const char* - ) - Version stringSee also
+ +public static rd_kafka_get_debug_contexts ( ): string|null
+
Retrieve supported debug contexts for use with the "debug"
configuration property. (runtime)
string|null
const char* - ) - Comma-separated list of available debugging contexts.See also
+ +public static rd_kafka_get_err_descs (
+ \FFI\CData|null $errdescs,
+ \FFI\CData|null $cntp
+ ): void
+
\FFI\CData|null
const struct rd_kafka_err_desc**\FFI\CData|null
size_t*public static rd_kafka_err2str (
+ int $err
+ ): string|null
+
Returns a human readable representation of a kafka error.
+ +int
rd_kafka_resp_err_t - ) - Error code to translatestring|null
const char*See also
+ +public static rd_kafka_err2name (
+ int $err
+ ): string|null
+
Returns the error code name (enum name).
+ +int
rd_kafka_resp_err_t - ) - Error code to translatestring|null
const char*See also
+ +public static rd_kafka_last_error ( ): int
+
Returns the last error code generated by a legacy API call in the current thread.
+The legacy APIs are the ones using errno to propagate error value, namely:
+The main use for this function is to avoid converting system errno
values to rd_kafka_resp_err_t codes for legacy APIs.
int
rd_kafka_resp_err_t - )See also
+ +public static rd_kafka_errno2err (
+ int|null $errnox
+ ): int
+
Converts the system errno value errnox
to a rd_kafka_resp_err_t error code upon failure from the following functions:
int|null
int - ) - System errno value to convertint
rd_kafka_resp_err_t - Appropriate error code for errnox
See also
+ +public static rd_kafka_errno ( ): int|null
+
Returns the thread-local system errno.
+On most platforms this is the same as errno
but in case of different runtimes between library and application (e.g., Windows static DLLs) this provides a means for exposing the errno librdkafka uses.
int|null
int - )See also
+ +public static rd_kafka_fatal_error (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Returns the first fatal error set on this client instance, or RD_KAFKA_RESP_ERR_NO_ERROR if no fatal error has occurred.
+This function is to be used with the Idempotent Producer and error_cb
to detect fatal errors.
Generally all errors raised by error_cb
are to be considered informational and temporary, the client will try to recover from all errors in a graceful fashion (by retrying, etc).
However, some errors should logically be considered fatal to retain consistency; in particular a set of errors that may occur when using the Idempotent Producer and the in-order or exactly-once producer guarantees can't be satisfied.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written to if there is a fatal error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if no fatal error has been raised, else any other error code.See also
+ +public static rd_kafka_test_fatal_error (
+ \FFI\CData|null $rk,
+ int $err,
+ string|null $reason
+ ): int
+
Trigger a fatal error for testing purposes.
+Since there is no practical way to trigger real fatal errors in the idempotent producer, this method allows an application to trigger fabricated fatal errors in tests to check its error handling code.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.int
rd_kafka_resp_err_t - The underlying error code.string|null
const char* - A human readable error reason. Will be prefixed with “test_fatal_error: ” to differentiate from real fatal errors.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if a fatal error was triggered, or RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS if a previous fatal error has already been triggered.See also
+ +public static rd_kafka_topic_partition_destroy (
+ \FFI\CData|null $rktpar
+ ): void
+
Destroy a rd_kafka_topic_partition_t.
+\FFI\CData|null
rd_kafka_topic_partition_t* - )See also
+ +public static rd_kafka_topic_partition_list_new (
+ int|null $size
+ ): \FFI\CData|null
+
Create a new list/vector Topic+Partition container.
+ +int|null
int - ) - Initial allocated size used when the expected number of elements is known or can be estimated. Avoids reallocation and possibly relocation of the elems array.\FFI\CData|null
rd_kafka_topic_partition_list_t* - A newly allocated Topic+Partition list.See also
+ +public static rd_kafka_topic_partition_list_destroy (
+ \FFI\CData|null $rkparlist
+ ): void
+
\FFI\CData|null
rd_kafka_topic_partition_list_t*public static rd_kafka_topic_partition_list_add (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition
+ ): \FFI\CData|null
+
Add topic+partition to list.
+ +\FFI\CData|null
rd_kafka_topic_partition_list_t* - List to extendstring|null
const char* - Topic name (copied)int|null
int32_t - Partition id\FFI\CData|null
rd_kafka_topic_partition_t* - The object which can be used to fill in additionals fields.See also
+ +public static rd_kafka_topic_partition_list_add_range (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $start,
+ int|null $stop
+ ): void
+
Add range of partitions from start
to stop
inclusive.
\FFI\CData|null
rd_kafka_topic_partition_list_t* - List to extendstring|null
const char* - Topic name (copied)int|null
int32_t - Start partition of rangeint|null
int32_t - Last partition of range (inclusive)See also
+ +public static rd_kafka_topic_partition_list_del (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition
+ ): int|null
+
Delete partition from list.
+ +\FFI\CData|null
rd_kafka_topic_partition_list_t* - List to modifystring|null
const char* - Topic name to matchint|null
int32_t - Partition to matchint|null
int - 1 if partition was found (and removed), else 0.See also
+ +public static rd_kafka_topic_partition_list_del_by_idx (
+ \FFI\CData|null $rktparlist,
+ int|null $idx
+ ): int|null
+
Delete partition from list by elems[] index.
+ +\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
intint|null
int - 1 if partition was found (and removed), else 0.See also
+ +public static rd_kafka_topic_partition_list_copy (
+ \FFI\CData|null $src
+ ): \FFI\CData|null
+
Make a copy of an existing list.
+ +\FFI\CData|null
const rd_kafka_topic_partition_list_t* - ) - The existing list to copy.\FFI\CData|null
rd_kafka_topic_partition_list_t* - A new list fully populated to be identical to src
See also
+ +public static rd_kafka_topic_partition_list_set_offset (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition,
+ int|null $offset
+ ): int
+
Set offset to offset
for topic
and partition
.
\FFI\CData|null
rd_kafka_topic_partition_list_t*string|null
const char*int|null
int32_tint|null
int64_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION if partition
was not found in the list.See also
+ +public static rd_kafka_topic_partition_list_find (
+ \FFI\CData|null $rktparlist,
+ string|null $topic,
+ int|null $partition
+ ): \FFI\CData|null
+
Find element by topic
and partition
.
\FFI\CData|null
rd_kafka_topic_partition_list_t*string|null
const char*int|null
int32_t\FFI\CData|null
rd_kafka_topic_partition_t* - a pointer to the first matching element, or NULL if not found.See also
+ +public static rd_kafka_topic_partition_list_sort (
+ \FFI\CData|null $rktparlist,
+ \FFI\CData|\Closure $cmp,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Sort list using comparator cmp
.
If cmp
is NULL the default comparator will be used that sorts by ascending topic name and partition.
cmp_opaque
is provided as the cmp_opaque
argument to cmp
.
\FFI\CData|null
rd_kafka_topic_partition_list_t*\FFI\CData|\Closure
int()(const void, const void*, void*)\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_headers_new (
+ int|null $initial_count
+ ): \FFI\CData|null
+
Create a new headers list.
+ +int|null
size_t - ) - Preallocate space for this number of headers. Any number of headers may be added, updated and removed regardless of the initial count.\FFI\CData|null
rd_kafka_headers_t*See also
+ +public static rd_kafka_headers_destroy (
+ \FFI\CData|null $hdrs
+ ): void
+
\FFI\CData|null
rd_kafka_headers_t*public static rd_kafka_headers_copy (
+ \FFI\CData|null $src
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_headers_t*\FFI\CData|null
rd_kafka_headers_t*public static rd_kafka_header_add (
+ \FFI\CData|null $hdrs,
+ string|null $name,
+ int|null $name_size,
+ \FFI\CData|object|string|null $value,
+ int|null $value_size
+ ): int
+
Add header with name name
and value val
(copied) of size size
(not including null-terminator).
\FFI\CData|null
rd_kafka_headers_t* - Headers list.string|null
const char* - Header name.int|null
ssize_t - Header name size (not including the null-terminator). If -1 the name
length is automatically acquired using strlen().\FFI\CData|object|string|null
const void* - Pointer to header value, or NULL (set size to 0 or -1).int|null
ssize_t - Size of header value. If -1 the value
is assumed to be a null-terminated string and the length is automatically acquired using strlen().int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__READ_ONLY if the headers are read-only, else RD_KAFKA_RESP_ERR_NO_ERROR.See also
+ +public static rd_kafka_header_remove (
+ \FFI\CData|null $hdrs,
+ string|null $name
+ ): int
+
Remove all headers for the given key (if any).
+ +\FFI\CData|null
rd_kafka_headers_t*string|null
const char*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__READ_ONLY if the headers are read-only, RD_KAFKA_RESP_ERR__NOENT if no matching headers were found, else RD_KAFKA_RESP_ERR_NO_ERROR if headers were removed.See also
+ +public static rd_kafka_header_get_last (
+ \FFI\CData|null $hdrs,
+ string|null $name,
+ \FFI\CData|object|string|null $valuep,
+ \FFI\CData|null $sizep
+ ): int
+
Find last header in list hdrs
matching name
.
valuep
includes a trailing null-terminator that is not accounted for in sizep
. \FFI\CData|null
const rd_kafka_headers_t* - Headers list.string|null
const char* - Header to find (last match).\FFI\CData|object|string|null
const void** - (out) Set to a (null-terminated) const pointer to the value (may be NULL).\FFI\CData|null
size_t* - (out) Set to the value’s size (not including null-terminator).int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if an entry was found, else RD_KAFKA_RESP_ERR__NOENT.See also
+ +public static rd_kafka_header_get (
+ \FFI\CData|null $hdrs,
+ int|null $idx,
+ string|null $name,
+ \FFI\CData|object|string|null $valuep,
+ \FFI\CData|null $sizep
+ ): int
+
Iterator for headers matching name
.
Same semantics as rd_kafka_header_get_last() ++ +
\FFI\CData|null
const rd_kafka_headers_t* - Headers to iterate.int|null
size_t - Iterator index, start at 0 and increment by one for each call as long as RD_KAFKA_RESP_ERR_NO_ERROR is returned.string|null
const char* - Header name to match.\FFI\CData|object|string|null
const void** - (out) Set to a (null-terminated) const pointer to the value (may be NULL).\FFI\CData|null
size_t* - (out) Set to the value’s size (not including null-terminator).int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_header_get_all (
+ \FFI\CData|null $hdrs,
+ int|null $idx,
+ \FFI\CData|null $namep,
+ \FFI\CData|object|string|null $valuep,
+ \FFI\CData|null $sizep
+ ): int
+
Iterator for all headers.
+Same semantics as rd_kafka_header_get() ++
\FFI\CData|null
const rd_kafka_headers_t*int|null
size_t\FFI\CData|null
const char**\FFI\CData|object|string|null
const void**\FFI\CData|null
size_t*int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_message_destroy (
+ \FFI\CData|null $rkmessage
+ ): void
+
\FFI\CData|null
rd_kafka_message_t*public static rd_kafka_message_timestamp (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $tstype
+ ): int|null
+
Returns the message timestamp for a consumed message.
+The timestamp is the number of milliseconds since the epoch (UTC).
+tstype
(if not NULL) is updated to indicate the type of timestamp.
\FFI\CData|null
const rd_kafka_message_t*\FFI\CData|null
rd_kafka_timestamp_type_t*int|null
int64_t - message timestamp, or -1 if not available.See also
+ +public static rd_kafka_message_latency (
+ \FFI\CData|null $rkmessage
+ ): int|null
+
Returns the latency for a produced message measured from the produce() call.
+ +\FFI\CData|null
const rd_kafka_message_t* - )int|null
int64_t - the latency in microseconds, or -1 if not available.See also
+ +public static rd_kafka_message_headers (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $hdrsp
+ ): int
+
Get the message header list.
+The returned pointer in *hdrsp
is associated with the rkmessage
and must not be used after destruction of the message object or the header list is replaced with rd_kafka_message_set_headers().
\FFI\CData|null
const rd_kafka_message_t*\FFI\CData|null
rd_kafka_headers_t**int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if headers were returned, RD_KAFKA_RESP_ERR__NOENT if the message has no headers, or another error code if the headers could not be parsed.See also
+ +public static rd_kafka_message_detach_headers (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $hdrsp
+ ): int
+
Get the message header list and detach the list from the message making the application the owner of the headers. The application must eventually destroy the headers using rd_kafka_headers_destroy(). The message's headers will be set to NULL.
+Otherwise same semantics as rd_kafka_message_headers()
+\FFI\CData|null
rd_kafka_message_t*\FFI\CData|null
rd_kafka_headers_t**int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_message_set_headers (
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|null $hdrs
+ ): void
+
Replace the message's current headers with a new list.
+ +\FFI\CData|null
rd_kafka_message_t* - The message to set headers.\FFI\CData|null
rd_kafka_headers_t* - New header list. The message object assumes ownership of the list, the list will be destroyed automatically with the message object. The new headers list may be updated until the message object is passed or returned to librdkafka.See also
+ +public static rd_kafka_header_cnt (
+ \FFI\CData|null $hdrs
+ ): int|null
+
Returns the number of header key/value pairs.
+ +\FFI\CData|null
const rd_kafka_headers_t* - ) - Headers to countint|null
size_tSee also
+ +public static rd_kafka_message_status (
+ \FFI\CData|null $rkmessage
+ ): int
+
Returns the message's persistence status in the topic log.
+\FFI\CData|null
const rd_kafka_message_t* - )int
rd_kafka_msg_status_tSee also
+ +public static rd_kafka_conf_new ( ): \FFI\CData|null
+
Create configuration object.
+When providing your own configuration to the rd_kafka_*_new_*
() calls the rd_kafka_conf_t objects needs to be created with this function which will set up the defaults. I.e.:
rd_kafka_conf_t *myconf;
+rd_kafka_conf_res_t res;
+
+myconf = rd_kafka_conf_new();
+res = rd_kafka_conf_set(myconf, "socket.timeout.ms", "600",
+ errstr, sizeof(errstr));
+if (res != RD_KAFKA_CONF_OK)
+ die("%s\n", errstr);
+
+rk = rd_kafka_new(..., myconf);
Please see CONFIGURATION.md for the default settings or use rd_kafka_conf_properties_show() to provide the information at runtime.
+The properties are identical to the Apache Kafka configuration properties whenever possible.
+\FFI\CData|null
rd_kafka_conf_t* - ) - A new rd_kafka_conf_t object with defaults set.See also
+ +public static rd_kafka_conf_destroy (
+ \FFI\CData|null $conf
+ ): void
+
\FFI\CData|null
rd_kafka_conf_t*public static rd_kafka_conf_dup (
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
Creates a copy/duplicate of configuration object conf
.
\FFI\CData|null
const rd_kafka_conf_t* - )\FFI\CData|null
rd_kafka_conf_t*See also
+ +public static rd_kafka_conf_dup_filter (
+ \FFI\CData|null $conf,
+ int|null $filter_cnt,
+ \FFI\CData|null $filter
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_conf_t*int|null
size_t\FFI\CData|null
const char**\FFI\CData|null
rd_kafka_conf_t*public static rd_kafka_conf_set (
+ \FFI\CData|null $conf,
+ string|null $name,
+ string|null $value,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets a configuration property.
+conf
must have been previously created with rd_kafka_conf_new().
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 subsequent rd_kafka_conf_set_default_topic_conf() calls will replace the current default topic configuration.
\FFI\CData|null
rd_kafka_conf_t*string|null
const char*string|null
const char*\FFI\CData|null
char*int|null
size_tint
rd_kafka_conf_res_t - rd_kafka_conf_res_t
to indicate success or failure. In case of failure errstr
is updated to contain a human readable error string.See also
+ +public static rd_kafka_conf_set_events (
+ \FFI\CData|null $conf,
+ int|null $events
+ ): void
+
\FFI\CData|null
rd_kafka_conf_t*int|null
intpublic static rd_kafka_conf_set_background_event_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $event_cb
+ ): void
+
Generic event callback to be used with the event API to trigger callbacks for rd_kafka_event_t
objects from a background thread serving the background queue.
How to use:
+The application must destroy the rkev
passed to event
cb using rd_kafka_event_destroy().
The event_cb
opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
event_cb
will be called spontaneously from a background thread completely managed by librdkafka. Take care to perform proper locking of application objects.\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_event_t*, void*)See also
+ +public static rd_kafka_conf_set_dr_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $dr_cb
+ ): void
+
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, void*, size_t, rd_kafka_resp_err_t, void*, void*)See also
+ +public static rd_kafka_conf_set_dr_msg_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $dr_msg_cb
+ ): void
+
Producer: Set delivery report callback in provided conf
object.
The delivery report callback will be called once for each message accepted by rd_kafka_produce() (et.al) with err
set to indicate the result of the produce request.
The callback is called when a message is succesfully produced or if librdkafka encountered a permanent failure. Delivery errors occur when the retry count is exceeded, when the message.timeout.ms timeout is exceeded or there is a permanent error like RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART.
+An application must call rd_kafka_poll() at regular intervals to serve queued delivery report callbacks.
+The broker-assigned offset can be retrieved with rkmessage->offset
and the timestamp can be retrieved using rd_kafka_message_timestamp().
The dr_msg_cb
opaque
argument is the opaque set with rd_kafka_conf_set_opaque(). The per-message msg_opaque value is available in rd_kafka_message_t._private
.
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, const rd_kafka_message_t*, void*)See also
+ +public static rd_kafka_conf_set_consume_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $consume_cb
+ ): void
+
Consumer: Set consume callback for use with rd_kafka_consumer_poll()
+The consume_cb
opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_message_t, void*)See also
+ +public static rd_kafka_conf_set_rebalance_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $rebalance_cb
+ ): void
+
Consumer: Set rebalance callback for use with coordinated consumer group balancing.
+The err
field is set to either RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS or RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS and 'partitions' contains the full partition set that was either assigned or revoked.
Registering a rebalance_cb
turns off librdkafka's automatic partition assignment/revocation and instead delegates that responsibility to the application's rebalance_cb
.
The rebalance callback is responsible for updating librdkafka's assignment set based on the two events: RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS and RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS but should also be able to handle arbitrary rebalancing failures where err
is neither of those.
For eager/non-cooperative partition.assignment.strategy
assignors, such as range
and roundrobin
, the application must use rd_kafka_assign() to set or clear the entire assignment. For the cooperative assignors, such as cooperative-sticky
, the application must use rd_kafka_incremental_assign() for RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS and rd_kafka_incremental_unassign() for RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS.
Without a rebalance callback this is done automatically by librdkafka but registering a rebalance callback gives the application flexibility in performing other operations along with the assigning/revocation, such as fetching offsets from an alternate location (on assign) or manually committing offsets (on revoke).
+rebalance_cb is always triggered exactly once when a rebalance completes with a new assignment, even if that assignment is empty. If an eager/non-cooperative assignor is configured, there will eventually be exactly one corresponding call to rebalance_cb to revoke these partitions (even if empty), whether this is due to a group rebalance or lost partitions. In the cooperative case, rebalance_cb will never be called if the set of partitions being revoked is empty (whether or not lost).
+The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
partitions
list is destroyed by librdkafka on return return from the rebalance_cb and must not be freed or saved by the application.partitions
list. Changing this list should only be done to change the initial offsets for each partition. But a function like rd_kafka_position()
might have unexpected effects for instance when a consumer gets assigned a partition it used to consume at an earlier rebalance. In this case, the list of partitions will be updated with the old offset for that partition. In this case, it is generally better to pass a copy of the list (see rd_kafka_topic_partition_list_copy()
). The result of rd_kafka_position()
is typically outdated in RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS.The following example shows the application's responsibilities:
+static void rebalance_cb (rd_kafka_t *rk, rd_kafka_resp_err_t err,
+ rd_kafka_topic_partition_list_t *partitions,
+ void *opaque) {
+
+switch (err)
+ {
+ case RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS:
+ // application may load offets from arbitrary external
+ // storage here and update \p partitions
+ if (!strcmp(rd_kafka_rebalance_protocol(rk), "COOPERATIVE"))
+ rd_kafka_incremental_assign(rk, partitions);
+ else // EAGER
+ rd_kafka_assign(rk, partitions);
+ break;
+
+ case RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS:
+ if (manual_commits) // Optional explicit manual commit
+ rd_kafka_commit(rk, partitions, 0); // sync commit
+
+ if (!strcmp(rd_kafka_rebalance_protocol(rk), "COOPERATIVE"))
+ rd_kafka_incremental_unassign(rk, partitions);
+ else // EAGER
+ rd_kafka_assign(rk, NULL);
+ break;
+
+ default:
+ handle_unlikely_error(err);
+ rd_kafka_assign(rk, NULL); // sync state
+ break;
+ }
+}
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_resp_err_t, rd_kafka_topic_partition_list_t*, void*)See also
+ +public static rd_kafka_conf_set_offset_commit_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $offset_commit_cb
+ ): void
+
Consumer: Set offset commit callback for use with consumer groups.
+The results of automatic or manual offset commits will be scheduled for this callback and is served by rd_kafka_consumer_poll().
+If no partitions had valid offsets to commit this callback will be called with err
== RD_KAFKA_RESP_ERR__NO_OFFSET which is not to be considered an error.
The offsets
list contains per-partition information:
offset:
committed offset (attempted)err:
commit errorThe callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_resp_err_t, rd_kafka_topic_partition_list_t*, void*)See also
+ +public static rd_kafka_conf_set_error_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $error_cb
+ ): void
+
Set error callback in provided conf object.
+The error callback is used by librdkafka to signal warnings and errors back to the application.
+These errors should generally be considered informational and non-permanent, the client will try to recover automatically from all type of errors. Given that the client and cluster configuration is correct the application should treat these as temporary errors.
+error_cb
will be triggered with err
set to RD_KAFKA_RESP_ERR__FATAL if a fatal error has been raised; in this case use rd_kafka_fatal_error() to retrieve the fatal error code and error string, and then begin terminating the client instance.
If no error_cb
is registered, or RD_KAFKA_EVENT_ERROR has not been set with rd_kafka_conf_set_events, then the errors will be logged instead.
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, int, const char*, void*)See also
+ +public static rd_kafka_conf_set_throttle_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $throttle_cb
+ ): void
+
Set throttle callback.
+The throttle callback is used to forward broker throttle times to the application for Produce and Fetch (consume) requests.
+Callbacks are triggered whenever a non-zero throttle time is returned by the broker, or when the throttle time drops back to zero.
+An application must call rd_kafka_poll() or rd_kafka_consumer_poll() at regular intervals to serve queued callbacks.
+The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(rd_kafka_t, const char*, int32_t, int, void*)See also
+ +public static rd_kafka_conf_set_log_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $log_cb
+ ): void
+
Set logger callback.
+The default is to print to stderr, but a syslog logger is also available, see rd_kafka_log_print and rd_kafka_log_syslog for the builtin alternatives. Alternatively the application may provide its own logger callback. Or pass func
as NULL to disable logging.
This is the configuration alternative to the deprecated rd_kafka_set_logger()
+rd_kafka_set_log_queue()
. An application MUST NOT call any librdkafka APIs or do any prolonged work in a non-forwarded log_cb
. \FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
void()(const rd_kafka_t, int, const char*, const char*)See also
+ +public static rd_kafka_conf_set_stats_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $stats_cb
+ ): void
+
Set statistics callback in provided conf object.
+The statistics callback is triggered from rd_kafka_poll() every statistics.interval.ms
(needs to be configured separately). Function arguments:
rk
- Kafka handlejson
- String containing the statistics data in JSON formatjson_len
- Length of json
string.opaque
- Application-provided opaque as set by rd_kafka_conf_set_opaque().For more information on the format of json
, see https://github.com/confluentinc/librdkafka/wiki/Statistics
If the application wishes to hold on to the json
pointer and free it at a later time it must return 1 from the stats_cb
. If the application returns 0 from the stats_cb
then librdkafka will immediately free the json
pointer.
See STATISTICS.md for a full definition of the JSON object.
+ +\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(rd_kafka_t, char*, size_t, void*)See also
+ +public static rd_kafka_conf_set_socket_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $socket_cb
+ ): void
+
Set socket callback.
+The socket callback is responsible for opening a socket according to the supplied domain
, type
and protocol
. The socket shall be created with CLOEXEC
set in a racefree fashion, if possible.
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
Default:
+\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(int, int, int, void)See also
+ +public static rd_kafka_conf_set_connect_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $connect_cb
+ ): void
+
Set connect callback.
+The connect callback is responsible for connecting socket sockfd
to peer address addr
. The id
field contains the broker identifier.
connect_cb
shall return 0 on success (socket connected) or an error number (errno) on error.
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(int, const struct sockaddr, int, const char*, void*)See also
+ +public static rd_kafka_conf_set_closesocket_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $closesocket_cb
+ ): void
+
Set close socket callback.
+Close a socket (optionally opened with socket_cb()).
+The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(int, void)See also
+ +public static rd_kafka_conf_set_opaque (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Sets the application's opaque pointer that will be passed to callbacks.
+\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_opaque (
+ \FFI\CData|null $rk
+ ): \FFI\CData|object|string|null
+
\FFI\CData|null
const rd_kafka_t*\FFI\CData|object|string|null
void*public static rd_kafka_conf_set_default_topic_conf (
+ \FFI\CData|null $conf,
+ \FFI\CData|null $tconf
+ ): void
+
Sets the default topic configuration to use for automatically subscribed topics (e.g., through pattern-matched topics). The topic config object is not usable after this call.
+\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|null
rd_kafka_topic_conf_t*See also
+ +public static rd_kafka_conf_get (
+ \FFI\CData|null $conf,
+ string|null $name,
+ \FFI\CData|null $dest,
+ \FFI\CData|null $dest_size
+ ): int
+
Retrieve configuration value for property name
.
If dest
is non-NULL the value will be written to dest
with at most dest_size
.
*dest_size
is updated to the full length of the value, thus if *dest_size
initially is smaller than the full length the application may reallocate dest
to fit the returned *dest_size
and try again.
If dest
is NULL only the full length of the value is returned.
Fallthrough: Topic-level configuration properties from the default_topic_conf
may be retrieved using this interface.
\FFI\CData|null
const rd_kafka_conf_t*string|null
const char*\FFI\CData|null
char*\FFI\CData|null
size_t*int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK
if the property name matched, else RD_KAFKA_CONF_UNKNOWN
.See also
+ +public static rd_kafka_topic_conf_get (
+ \FFI\CData|null $conf,
+ string|null $name,
+ \FFI\CData|null $dest,
+ \FFI\CData|null $dest_size
+ ): int
+
Retrieve topic configuration value for property name
.
\FFI\CData|null
const rd_kafka_topic_conf_t*string|null
const char*\FFI\CData|null
char*\FFI\CData|null
size_t*int
rd_kafka_conf_res_tSee also
+ +public static rd_kafka_conf_dump (
+ \FFI\CData|null $conf,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Dump the configuration properties and values of conf
to an array with "key", "value" pairs.
The number of entries in the array is returned in *cntp
.
The dump must be freed with rd_kafka_conf_dump_free()
.
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|null
size_t*\FFI\CData|null
const char**See also
+ +public static rd_kafka_topic_conf_dump (
+ \FFI\CData|null $conf,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Dump the topic configuration properties and values of conf
to an array with "key", "value" pairs.
The number of entries in the array is returned in *cntp
.
The dump must be freed with rd_kafka_conf_dump_free()
.
\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|null
size_t*\FFI\CData|null
const char**See also
+ +public static rd_kafka_conf_dump_free (
+ \FFI\CData|null $arr,
+ int|null $cnt
+ ): void
+
\FFI\CData|null
const char**int|null
size_tpublic static rd_kafka_conf_properties_show (
+ \FFI\CData|null $fp
+ ): void
+
Prints a table to fp
of all supported configuration properties, their default values as well as a description.
\FFI\CData|null
FILE* - )See also
+ +public static rd_kafka_topic_conf_new ( ): \FFI\CData|null
+
Create topic configuration object.
+\FFI\CData|null
rd_kafka_topic_conf_t* - )See also
+ +public static rd_kafka_topic_conf_dup (
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_topic_conf_t*\FFI\CData|null
rd_kafka_topic_conf_t*public static rd_kafka_default_topic_conf_dup (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_conf_t*public static rd_kafka_topic_conf_destroy (
+ \FFI\CData|null $topic_conf
+ ): void
+
\FFI\CData|null
rd_kafka_topic_conf_t*public static rd_kafka_topic_conf_set (
+ \FFI\CData|null $conf,
+ string|null $name,
+ string|null $value,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets a single rd_kafka_topic_conf_t value by property name.
+topic_conf
should have been previously set up with rd_kafka_topic_conf_new()
.
\FFI\CData|null
rd_kafka_topic_conf_t*string|null
const char*string|null
const char*\FFI\CData|null
char*int|null
size_tint
rd_kafka_conf_res_t - rd_kafka_conf_res_t to indicate success or failure.See also
+ +public static rd_kafka_topic_conf_set_opaque (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Sets the application's opaque pointer that will be passed to all topic callbacks as the rkt_opaque
argument.
\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_topic_conf_set_partitioner_cb (
+ \FFI\CData|null $topic_conf,
+ \FFI\CData|\Closure $partitioner
+ ): void
+
Producer: Set partitioner callback in provided topic conf object.
+The partitioner may be called in any thread at any time, it may be called multiple times for the same message/key.
+The callback's rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The callback's msg_opaque
argument is the per-message opaque passed to produce().
Partitioner function constraints:
+RD_KAFKA_PARTITION_UA
value if partitioning could not be performed. \FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|\Closure
int32_t()(const rd_kafka_topic_t, const void*, size_t, int32_t, void*, void*)See also
+ +public static rd_kafka_topic_conf_set_msg_order_cmp (
+ \FFI\CData|null $topic_conf,
+ \FFI\CData|\Closure $msg_order_cmp
+ ): void
+
Producer: Set message queueing order comparator callback.
+The callback may be called in any thread at any time, it may be called multiple times for the same message.
+Ordering comparator function constraints:
+The comparator shall compare the two messages and return:
+a
should be inserted before message b
.a
should be inserted after message b
.queuing.strategy=fifo
new messages are enqueued to the tail of the queue regardless of msg_order_cmp, but retried messages are still affected by msg_order_cmp.\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|\Closure
int()(const rd_kafka_message_t, const rd_kafka_message_t*)See also
+ +public static rd_kafka_topic_partition_available (
+ \FFI\CData|null $rkt,
+ int|null $partition
+ ): int|null
+
Check if partition is available (has a leader broker).
+ +\FFI\CData|null
const rd_kafka_topic_t*int|null
int32_tint|null
int - 1 if the partition is available, else 0.See also
+ +public static rd_kafka_msg_partitioner_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Random partitioner.
+Will try not to return unavailable partitions.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a random partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_consistent (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent partitioner.
+Uses consistent hashing to map identical keys onto identical partitions.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a “random” partition between 0 and partition_cnt
- 1 based on the CRC value of the keySee also
+ +public static rd_kafka_msg_partitioner_consistent_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent-Random partitioner.
+This is the default partitioner. Uses consistent hashing to map identical keys onto identical partitions, and messages without keys will be assigned via the random partitioner.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a “random” partition between 0 and partition_cnt
- 1 based on the CRC value of the key (if provided)See also
+ +public static rd_kafka_msg_partitioner_murmur2 (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Murmur2 partitioner (Java compatible).
+Uses consistent hashing to map identical keys onto identical partitions using Java-compatible Murmur2 hashing.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_murmur2_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent-Random Murmur2 partitioner (Java compatible).
+Uses consistent hashing to map identical keys onto identical partitions using Java-compatible Murmur2 hashing. Messages without keys will be assigned via the random partitioner.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_new (
+ int $type,
+ \FFI\CData|null $conf,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Creates a new Kafka handle and starts its operation according to the specified type
(RD_KAFKA_CONSUMER
or RD_KAFKA_PRODUCER
).
conf
is an optional struct created with rd_kafka_conf_new()
that will be used instead of the default configuration. The conf
object is freed by this function on success and must not be used or destroyed by the application subsequently. See rd_kafka_conf_set()
et.al for more information.
errstr
must be a pointer to memory of at least size errstr_size
where rd_kafka_new()
may write a human readable error message in case the creation of a new handle fails. In which case the function returns NULL.
RD_KAFKA_CONSUMER
rd_kafka_t handle is created it may either operate in the legacy simple consumer mode using the rd_kafka_consume_start() interface, or the High-level KafkaConsumer API. int
rd_kafka_type_t\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|null
char*int|null
size_t\FFI\CData|null
rd_kafka_t* - The Kafka handle on success or NULL on error (see errstr
)See also
+ +public static rd_kafka_destroy (
+ \FFI\CData|null $rk
+ ): void
+
Destroy Kafka handle.
+group.id
was configured, and the rd_kafka_consumer_close() was not explicitly called by the application. This in turn may trigger consumer callbacks, such as rebalance_cb. Use rd_kafka_destroy_flags() with RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE to avoid this behaviour.\FFI\CData|null
rd_kafka_t* - )See also
+ +public static rd_kafka_destroy_flags (
+ \FFI\CData|null $rk,
+ int|null $flags
+ ): void
+
\FFI\CData|null
rd_kafka_t*int|null
intpublic static rd_kafka_name (
+ \FFI\CData|null $rk
+ ): string|null
+
\FFI\CData|null
const rd_kafka_t*string|null
const char*public static rd_kafka_type (
+ \FFI\CData|null $rk
+ ): int
+
\FFI\CData|null
const rd_kafka_t*int
rd_kafka_type_tpublic static rd_kafka_memberid (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Returns this client's broker-assigned group member id.
+\FFI\CData|null
const rd_kafka_t* - )\FFI\CData|null
char* - An allocated string containing the current broker-assigned group member id, or NULL if not available. The application must free the string with free()
or rd_kafka_mem_free()See also
+ +public static rd_kafka_clusterid (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Returns the ClusterId as reported in broker metadata.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.int|null
int - If there is no cached value from metadata retrieval then this specifies the maximum amount of time (in milliseconds) the call will block waiting for metadata to be retrieved. Use 0 for non-blocking calls.\FFI\CData|null
char* - a newly allocated string containing the ClusterId, or NULL if no ClusterId could be retrieved in the allotted timespan.See also
+ +public static rd_kafka_controllerid (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): int|null
+
Returns the current ControllerId as reported in broker metadata.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.int|null
int - If there is no cached value from metadata retrieval then this specifies the maximum amount of time (in milliseconds) the call will block waiting for metadata to be retrieved. Use 0 for non-blocking calls.int|null
int32_t - the controller broker id (>= 0), or -1 if no ControllerId could be retrieved in the allotted timespan.See also
+ +public static rd_kafka_topic_new (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
Creates a new topic handle for topic named topic
.
conf
is an optional configuration for the topic created with rd_kafka_topic_conf_new()
that will be used instead of the default topic configuration. The conf
object is freed by this function and must not be used or destroyed by the application subsequently. See rd_kafka_topic_conf_set()
et.al for more information.
Topic handles are refcounted internally and calling rd_kafka_topic_new() again with the same topic name will return the previous topic handle without updating the original handle's configuration. Applications must eventually call rd_kafka_topic_destroy() for each succesfull call to rd_kafka_topic_new() to clear up resources.
+ +\FFI\CData|null
rd_kafka_t*string|null
const char*\FFI\CData|null
rd_kafka_topic_conf_t*\FFI\CData|null
rd_kafka_topic_t* - the new topic handle or NULL on error (use rd_kafka_errno2err() to convert system errno
to an rd_kafka_resp_err_t error code.See also
+ +public static rd_kafka_topic_destroy (
+ \FFI\CData|null $rkt
+ ): void
+
Loose application's topic handle refcount as previously created with rd_kafka_topic_new()
.
\FFI\CData|null
rd_kafka_topic_t* - )See also
+ +public static rd_kafka_topic_name (
+ \FFI\CData|null $rkt
+ ): string|null
+
\FFI\CData|null
const rd_kafka_topic_t*string|null
const char*public static rd_kafka_topic_opaque (
+ \FFI\CData|null $rkt
+ ): \FFI\CData|object|string|null
+
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
void*public static rd_kafka_poll (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): int|null
+
Polls the provided kafka handle for events.
+Events will cause application-provided callbacks to be called.
+The timeout_ms
argument specifies the maximum amount of time (in milliseconds) that the call will block waiting for events. For non-blocking calls, provide 0 as timeout_ms
. To wait indefinitely for an event, provide -1.
Events:
+\FFI\CData|null
rd_kafka_t*int|null
intint|null
int - the number of events served.See also
+ +public static rd_kafka_yield (
+ \FFI\CData|null $rk
+ ): void
+
Cancels the current callback dispatcher (rd_kafka_poll(), rd_kafka_consume_callback(), etc).
+A callback may use this to force an immediate return to the calling code (caller of e.g. rd_kafka_poll()) without processing any further events.
+\FFI\CData|null
rd_kafka_t* - )See also
+ +public static rd_kafka_pause_partitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Pause producing or consumption for the provided list of partitions.
+Success or error is returned per-partition err
in the partitions
list.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_resume_partitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Resume producing consumption for the provided list of partitions.
+Success or error is returned per-partition err
in the partitions
list.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_query_watermark_offsets (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ int|null $partition,
+ \FFI\CData|null $low,
+ \FFI\CData|null $high,
+ int|null $timeout_ms
+ ): int
+
Query broker for low (oldest/beginning) and high (newest/end) offsets for partition.
+Offsets are returned in *low
and *high
respectively.
\FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int32_t\FFI\CData|null
int64_t*\FFI\CData|null
int64_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure.See also
+ +public static rd_kafka_get_watermark_offsets (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ int|null $partition,
+ \FFI\CData|null $low,
+ \FFI\CData|null $high
+ ): int
+
Get last known low (oldest/beginning) and high (newest/end) offsets for partition.
+The low offset is updated periodically (if statistics.interval.ms is set) while the high offset is updated on each fetched message set from the broker.
+If there is no cached offset (either low or high, or both) then RD_KAFKA_OFFSET_INVALID will be returned for the respective offset.
+Offsets are returned in *low
and *high
respectively.
\FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int32_t\FFI\CData|null
int64_t*\FFI\CData|null
int64_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure.See also
+ +public static rd_kafka_offsets_for_times (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ int|null $timeout_ms
+ ): int
+
Look up the offsets for the given partitions by timestamp.
+The returned offset for each partition is the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition.
+The timestamps to query are represented as offset
in offsets
on input, and offset
will contain the offset on output.
The function will block for at most timeout_ms
milliseconds.
rd_kafka_topic_partition_t.err
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if offsets were be queried (do note that per-partition errors might be set), RD_KAFKA_RESP_ERR__TIMED_OUT if not all offsets could be fetched within timeout_ms
, RD_KAFKA_RESP_ERR__INVALID_ARG if the offsets
list is empty, RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION if all partitions are unknown, RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE if unable to query leaders for the given partitions.See also
+ +public static rd_kafka_mem_free (
+ \FFI\CData|null $rk,
+ \FFI\CData|object|string|null $ptr
+ ): void
+
Free pointer returned by librdkafka.
+This is typically an abstraction for the free(3) call and makes sure the application can use the same memory allocator as librdkafka for freeing pointers returned by librdkafka.
+In standard setups it is usually not necessary to use this interface rather than the free(3) functione.
+rk
must be set for memory returned by APIs that take an rk
argument, for other APIs pass NULL for rk
.
\FFI\CData|null
rd_kafka_t*\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_queue_new (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Create a new message queue.
+See rd_kafka_consume_start_queue(), rd_kafka_consume_queue(), et.al.
+ +\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_queue_destroy (
+ \FFI\CData|null $rkqu
+ ): void
+
Destroy a queue, purging all of its enqueued messages.
+ +\FFI\CData|null
rd_kafka_queue_t* - )See also
+ +public static rd_kafka_queue_get_main (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+ +\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the main librdkafka event queue. This is the queue served by rd_kafka_poll().See also
+ +public static rd_kafka_queue_get_consumer (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the librdkafka consumer queue. This is the queue served by rd_kafka_consumer_poll().See also
+ +public static rd_kafka_queue_get_partition (
+ \FFI\CData|null $rk,
+ string|null $topic,
+ int|null $partition
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int32_t\FFI\CData|null
rd_kafka_queue_t* - a reference to the partition’s queue, or NULL if partition is invalid.See also
+ +public static rd_kafka_queue_get_background (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
The background thread queue provides the application with an automatically polled queue that triggers the event callback in a background thread, this background thread is completely managed by librdkafka.
+The background thread queue is automatically created if a generic event handler callback is configured with rd_kafka_conf_set_background_event_cb() or if rd_kafka_queue_get_background() is called.
+The background queue is polled and served by librdkafka and MUST NOT be polled, forwarded, or otherwise managed by the application, it may only be used as the destination queue passed to queue-enabled APIs, such as the Admin API.
+Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the background thread queue, or NULL if the background queue is not enabled.See also
+ +public static rd_kafka_queue_forward (
+ \FFI\CData|null $src,
+ \FFI\CData|null $dst
+ ): void
+
Forward/re-route queue src
to dst
. If dst
is NULL
the forwarding is removed.
The internal refcounts for both queues are increased.
+dst
is NULL or not, after calling this function, src
will not forward it's fetch queue to the consumer queue. \FFI\CData|null
rd_kafka_queue_t*\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_set_log_queue (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkqu
+ ): int
+
Forward librdkafka logs (and debug) to the specified queue for serving with one of the ..poll() calls.
+This allows an application to serve log callbacks (log_cb
) in its thread of choice.
log.queue
MUST also be set to true.\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_queue_t* - Queue to forward logs to. If the value is NULL the logs are forwarded to the main queue.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error, eg RD_KAFKA_RESP_ERR__NOT_CONFIGURED when log.queue is not set to true.See also
+ +public static rd_kafka_queue_length (
+ \FFI\CData|null $rkqu
+ ): int|null
+
\FFI\CData|null
rd_kafka_queue_t* - )int|null
size_t - the current number of elements in queue.See also
+ +public static rd_kafka_queue_io_event_enable (
+ \FFI\CData|null $rkqu,
+ int|null $fd,
+ \FFI\CData|object|string|null $payload,
+ int|null $size
+ ): void
+
Enable IO event triggering for queue.
+To ease integration with IO based polling loops this API allows an application to create a separate file-descriptor that librdkafka will write payload
(of size size
) to whenever a new element is enqueued on a previously empty queue.
To remove event triggering call with fd
= -1.
librdkafka will maintain a copy of the payload
.
\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|object|string|null
const void*int|null
size_tSee also
+ +public static rd_kafka_queue_cb_event_enable (
+ \FFI\CData|null $rkqu,
+ \FFI\CData|\Closure $event_cb,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
Enable callback event triggering for queue.
+The callback will be called from an internal librdkafka thread when a new element is enqueued on a previously empty queue.
+To remove event triggering call with event_cb
= NULL.
The qev_opaque
is passed to the callback's qev_opaque
argument.
\FFI\CData|null
rd_kafka_queue_t*\FFI\CData|\Closure
void()(rd_kafka_t, void*)\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_consume_start (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset
+ ): int|null
+
Start consuming messages for topic rkt
and partition
at offset offset
which may either be an absolute (0..N) or one of the logical offsets:
rdkafka will attempt to keep queued.min.messages
(config property) messages in the local queue by repeatedly fetching batches of messages from the broker until the threshold is reached.
The application shall use one of the rd_kafka_consume*()
functions to consume messages from the local queue, each kafka message being represented as a rd_kafka_message_t *
object.
rd_kafka_consume_start()
must not be called multiple times for the same topic and partition without stopping consumption first with rd_kafka_consume_stop()
.
Use rd_kafka_errno2err()
to convert sytem errno
to rd_kafka_resp_err_t
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_tint|null
int - 0 on success or -1 on error in which case errno is set accordingly:partition
is invalid. (RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION)See also
+ +public static rd_kafka_consume_start_queue (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset,
+ \FFI\CData|null $rkqu
+ ): int|null
+
Same as rd_kafka_consume_start() but re-routes incoming messages to the provided queue rkqu
(which must have been previously allocated with rd_kafka_queue_new()
.
The application must use one of the rd_kafka_consume_*_queue()
functions to receive fetched messages.
rd_kafka_consume_start_queue()
must not be called multiple times for the same topic and partition without stopping consumption first with rd_kafka_consume_stop()
. rd_kafka_consume_start()
and rd_kafka_consume_start_queue()
must not be combined for the same topic and partition.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_t\FFI\CData|null
rd_kafka_queue_t*int|null
intSee also
+ +public static rd_kafka_consume_stop (
+ \FFI\CData|null $rkt,
+ int|null $partition
+ ): int|null
+
Stop consuming messages for topic rkt
and partition
, purging all messages currently in the local queue.
NOTE: To enforce synchronisation this call will block until the internal fetcher has terminated and offsets are committed to configured storage method.
+The application needs to be stop all consumers before calling rd_kafka_destroy()
on the main object handle.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int - 0 on success or -1 on error (see errno
).See also
+ +public static rd_kafka_seek (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset,
+ int|null $timeout_ms
+ ): int
+
Seek consumer for topic+partition to offset
which is either an absolute or logical offset.
If timeout_ms
is specified (not 0) the seek call will wait this long for the consumer to update its fetcher state for the given partition with the new offset. This guarantees that no previously fetched messages for the old offset (or fetch position) will be passed to the application.
If the timeout is reached the internal state will be unknown to the caller and this function returns RD_KAFKA_RESP_ERR__TIMED_OUT
.
If timeout_ms
is 0 it will initiate the seek but return immediately without any error reporting (e.g., async).
This call will purge all pre-fetched messages for the given partition, which may be up to queued.max.message.kbytes
in size. Repeated use of seek may thus lead to increased network usage as messages are re-fetched from the broker.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_tint|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__NO_ERROR
on success else an error code.See also
+ +public static rd_kafka_consume (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Consume a single message from topic rkt
and partition
.
timeout_ms
is maximum amount of time to wait for a message to be received. Consumer must have been previously started with rd_kafka_consume_start()
.
Errors (when returning NULL):
+timeout_ms
was reached with no new messages fetched.rkt
+ partition
is unknown. (no prior rd_kafka_consume_start()
call)NOTE: The returned message's ..->err must be checked for errors. NOTE:
..->err
==
RD_KAFKA_RESP_ERR__PARTITION_EOF
signals that the end of the partition has been reached, which should typically not be considered an error. The application should handle this case (e.g., ignore).
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|null
rd_kafka_message_t* - a message object on success or NULL
on error. The message object must be destroyed with rd_kafka_message_destroy()
when the application is done with it.See also
+ +public static rd_kafka_consume_batch (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $timeout_ms,
+ \FFI\CData|null $rkmessages,
+ int|null $rkmessages_size
+ ): int|null
+
Consume up to rkmessages_size
from topic rkt
and partition
putting a pointer to each message in the application provided array rkmessages
(of size rkmessages_size
entries).
rd_kafka_consume_batch()
provides higher throughput performance than rd_kafka_consume()
.
timeout_ms
is the maximum amount of time to wait for all of rkmessages_size
messages to be put into rkmessages
. If no messages were available within the timeout period this function returns 0 and rkmessages
remains untouched. This differs somewhat from rd_kafka_consume()
.
The message objects must be destroyed with rd_kafka_message_destroy()
when the application is done with it.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|null
rd_kafka_message_t**int|null
size_tint|null
ssize_t - the number of rkmessages added in rkmessages
, or -1 on error (same error codes as for rd_kafka_consume()
.See also
+ +public static rd_kafka_consume_callback (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $timeout_ms,
+ \FFI\CData|\Closure $consume_cb,
+ \FFI\CData|object|string|null $opaque
+ ): int|null
+
Consumes messages from topic rkt
and partition
, calling the provided callback for each consumed messsage.
rd_kafka_consume_callback()
provides higher throughput performance than both rd_kafka_consume()
and rd_kafka_consume_batch()
.
timeout_ms
is the maximum amount of time to wait for one or more messages to arrive.
The provided consume_cb
function is called for each message, the application MUST NOT call rd_kafka_message_destroy()
on the provided rkmessage
.
The commit_opaque
argument is passed to the consume_cb
as commit_opaque
.
\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|\Closure
void()(rd_kafka_message_t, void*)\FFI\CData|object|string|null
void*int|null
int - the number of messages processed or -1 on error.See also
+ +public static rd_kafka_consume_queue (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Consume from queue.
+\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|null
rd_kafka_message_t*See also
+ +public static rd_kafka_consume_batch_queue (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms,
+ \FFI\CData|null $rkmessages,
+ int|null $rkmessages_size
+ ): int|null
+
Consume batch of messages from queue.
+\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|null
rd_kafka_message_t**int|null
size_tint|null
ssize_tSee also
+ +public static rd_kafka_consume_callback_queue (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms,
+ \FFI\CData|\Closure $consume_cb,
+ \FFI\CData|object|string|null $opaque
+ ): int|null
+
Consume multiple messages from queue with callback.
+\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|\Closure
void()(rd_kafka_message_t, void*)\FFI\CData|object|string|null
void*int|null
intSee also
+ +public static rd_kafka_offset_store (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $offset
+ ): int
+
Store offset offset
+ 1 for topic rkt
partition partition
.
The offset
+ 1 will be committed (written) to broker (or file) according to
or manual offset-less commit()auto.commit.interval.ms
enable.auto.offset.store
must be set to "false" when using this API.\FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int64_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error.See also
+ +public static rd_kafka_offsets_store (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets
+ ): int
+
Store offsets for next auto-commit for one or more partitions.
+The offset will be committed (written) to the offset store according to
or manual offset-less commit().auto.commit.interval.ms
Per-partition success/error status propagated through each partition's .err for all return values (even NO_ERROR) except INVALID_ARG.
.offset field is stored as is, it will NOT be + 1.enable.auto.offset.store
must be set to "false" when using this API.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on (partial) success, or RD_KAFKA_RESP_ERR__INVALID_ARG if enable.auto.offset.store
is true, or RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION or RD_KAFKA_RESP_ERR__STATE if none of the offsets could be stored.See also
+ +public static rd_kafka_subscribe (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topics
+ ): int
+
Subscribe to topic set using balanced consumer groups.
+Wildcard (regex) topics are supported: any topic name in the topics
list that is prefixed with "^"
will be regex-matched to the full list of topics in the cluster and matching topics will be added to the subscription list.
The full topic list is retrieved every topic.metadata.refresh.interval.ms
to pick up new or delete topics that match the subscription. If there is any change to the matched topics the consumer will immediately rejoin the group with the updated set of subscribed topics.
Regex and full topic names can be mixed in topics
.
.topic field is used in the supplied topics
list, all other fields are ignored.session.timeout.ms
* 2 or more to complete.topics
. The error will be RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART for non-existent topics, and RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED for unauthorized topics. The consumer error will be raised through rd_kafka_consumer_poll() (et.al.) with the rd_kafka_message_t.err
field set to one of the error codes mentioned above. The subscribe function itself is asynchronous and will not return an error on unavailable topics.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__INVALID_ARG if list is empty, contains invalid topics or regexes or duplicate entries, RD_KAFKA_RESP_ERR__FATAL if the consumer has raised a fatal error.See also
+ +public static rd_kafka_unsubscribe (
+ \FFI\CData|null $rk
+ ): int
+
\FFI\CData|null
rd_kafka_t*int
rd_kafka_resp_err_tpublic static rd_kafka_subscription (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topics
+ ): int
+
Returns the current topic subscription.
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t**int
rd_kafka_resp_err_t - An error code on failure, otherwise topic
is updated to point to a newly allocated topic list (possibly empty).See also
+ +public static rd_kafka_consumer_poll (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Poll the consumer for messages or events.
+Will block for at most timeout_ms
milliseconds.
max.poll.interval.ms
to remain a member of the consumer group.Noteworthy errors returned in ->err:
max.poll.interval.ms
.\FFI\CData|null
rd_kafka_t*int|null
int\FFI\CData|null
rd_kafka_message_t* - A message object which is a proper message if ->err
is RD_KAFKA_RESP_ERR_NO_ERROR, or an event or error for any other value.See also
+ +public static rd_kafka_consumer_close (
+ \FFI\CData|null $rk
+ ): int
+
Close the consumer.
+This call will block until the consumer has revoked its assignment, calling the rebalance_cb
if it is configured, committed offsets to broker, and left the consumer group (if applicable). The maximum blocking time is roughly limited to session.timeout.ms.
\FFI\CData|null
rd_kafka_t* - )int
rd_kafka_resp_err_t - An error code indicating if the consumer close was succesful or not. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.See also
+ +public static rd_kafka_assign (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Atomic assignment of partitions to consume.
+The new partitions
will replace the existing assignment.
A zero-length partitions
will treat the partitions as a valid, albeit empty assignment, and maintain internal state, while a NULL
value for partitions
will reset and clear the internal state.
When used from a rebalance callback, the application should pass the partition list passed to the callback (or a copy of it) even if the list is empty (i.e. should not pass NULL in this case) so as to maintain internal join state. This is not strictly required - the application may adjust the assignment provided by the group. However, this is rarely useful in practice.
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - An error code indicating if the new assignment was applied or not. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.See also
+ +public static rd_kafka_assignment (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Returns the current partition assignment as set by rd_kafka_assign() or rd_kafka_incremental_assign().
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t**int
rd_kafka_resp_err_t - An error code on failure, otherwise partitions
is updated to point to a newly allocated partition list (possibly empty).See also
+ +public static rd_kafka_commit (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ int|null $async
+ ): int
+
Commit offsets on broker for the provided list of partitions.
+offsets
should contain topic
, partition
, offset
and possibly metadata
. The offset
should be the offset where consumption will resume, i.e., the last processed offset + 1. If offsets
is NULL the current partition assignment will be used instead.
If async
is false this operation will block until the broker offset commit is done, returning the resulting success or error code.
If a rd_kafka_conf_set_offset_commit_cb() offset commit callback has been configured the callback will be enqueued for a future call to rd_kafka_poll(), rd_kafka_consumer_poll() or similar.
+ +\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*int|null
intint
rd_kafka_resp_err_t - An error code indiciating if the commit was successful, or successfully scheduled if asynchronous, or failed. RD_KAFKA_RESP_ERR__FATAL is returned if the consumer has raised a fatal error.See also
+ +public static rd_kafka_commit_message (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ int|null $async
+ ): int
+
Commit message's offset on broker for the message's partition. The committed offset is the message's offset + 1.
+\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_message_t*int|null
intint
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_commit_queue (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ \FFI\CData|null $rkqu,
+ \FFI\CData|\Closure $cb,
+ \FFI\CData|object|string|null $opaque
+ ): int
+
Commit offsets on broker for the provided list of partitions.
+See rd_kafka_commit for offsets
semantics.
The result of the offset commit will be posted on the provided rkqu
queue.
If the application uses one of the poll APIs (rd_kafka_poll(), rd_kafka_consumer_poll(), rd_kafka_queue_poll(), ..) to serve the queue the cb
callback is required.
The commit_opaque
argument is passed to the callback as commit_opaque
, or if using the event API the callback is ignored and the offset commit result will be returned as an RD_KAFKA_EVENT_COMMIT event and the commit_opaque
value will be available with rd_kafka_event_opaque().
If rkqu
is NULL a temporary queue will be created and the callback will be served by this call.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*\FFI\CData|null
rd_kafka_queue_t*\FFI\CData|\Closure
void()(rd_kafka_t, rd_kafka_resp_err_t, rd_kafka_topic_partition_list_t*, void*)\FFI\CData|object|string|null
void*int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_committed (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions,
+ int|null $timeout_ms
+ ): int
+
Retrieve committed offsets for topics+partitions.
+The offset
field of each requested partition will either be set to stored offset or to RD_KAFKA_OFFSET_INVALID in case there was no stored offset for that partition.
Committed offsets will be returned according to the isolation.level
configuration property, if set to read_committed
(default) then only stable offsets for fully committed transactions will be returned, while read_uncommitted
may return offsets for not yet committed transactions.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success in which case the offset
or err
field of each partitions’
element is filled in with the stored offset, or a partition specific error. Else returns an error code.See also
+ +public static rd_kafka_position (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): int
+
Retrieve current positions (offsets) for topics+partitions.
+The offset
field of each requested partition will be set to the offset of the last consumed message + 1, or RD_KAFKA_OFFSET_INVALID in case there was no previous message.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success in which case the offset
or err
field of each partitions’
element is filled in with the stored offset, or a partition specific error. Else returns an error code.See also
+ +public static rd_kafka_produce (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $msgflags,
+ \FFI\CData|object|string|null $payload,
+ int|null $len,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Produce and send a single message to broker.
+rkt
is the target topic which must have been previously created with rd_kafka_topic_new()
.
rd_kafka_produce()
is an asynchronous non-blocking API. See rd_kafka_conf_set_dr_msg_cb
on how to setup a callback to be called once the delivery status (success or failure) is known. The delivery report is triggered by the application calling rd_kafka_poll()
(at regular intervals) or rd_kafka_flush()
(at termination).
Since producing is asynchronous, you should call rd_kafka_flush()
before you destroy the producer. Otherwise, any outstanding messages will be silently discarded.
When temporary errors occur, librdkafka automatically retries to produce the messages. Retries are triggered after retry.backoff.ms and when the leader broker for the given partition is available. Otherwise, librdkafka falls back to polling the topic metadata to monitor when a new leader is elected (see the topic.metadata.refresh.fast.interval.ms and topic.metadata.refresh.interval.ms configurations) and then performs a retry. A delivery error will occur if the message could not be produced within message.timeout.ms.
+See the "Message reliability" chapter in INTRODUCTION.md for more information.
+partition
is the target partition, either:
msgflags
is zero or more of the following flags OR:ed together: RD_KAFKA_MSG_F_BLOCK - block produce*
() call if queue.buffering.max.messages
or queue.buffering.max.kbytes
are exceeded. Messages are considered in-queue from the point they are accepted by produce() until their corresponding delivery report callback/event returns. It is thus a requirement to call rd_kafka_poll() (or equiv.) from a separate thread when F_BLOCK is used. See WARNING on RD_KAFKA_MSG_F_BLOCK
above.
RD_KAFKA_MSG_F_FREE - rdkafka will free(3) payload
when it is done with it. RD_KAFKA_MSG_F_COPY - the payload
data will be copied and the payload
pointer will not be used by rdkafka after the call returns. RD_KAFKA_MSG_F_PARTITION - produce_batch() will honour per-message partition, either set manually or by the configured partitioner.
.._F_FREE and .._F_COPY are mutually exclusive. If neither of these are set, the caller must ensure that the memory backing payload
remains valid and is not modified or reused until the delivery callback is invoked. Other buffers passed to rd_kafka_produce()
don't have this restriction on reuse, i.e. the memory backing the key or the topic name may be reused as soon as rd_kafka_produce()
returns.
If the function returns -1 and RD_KAFKA_MSG_F_FREE was specified, then the memory associated with the payload is still the caller's responsibility.
+payload
is the message payload of size len
bytes.
key
is an optional message key of size keylen
bytes, if non-NULL it will be passed to the topic partitioner as well as be sent with the message to the broker and passed on to the consumer.
msg_opaque
is an optional application-provided per-message opaque pointer that will provided in the message's delivery report callback (dr_msg_cb
or dr_cb
) and the rd_kafka_message_t
_private
field.
transactional.id
is configured) producing is only allowed during an on-going transaction, namely after rd_kafka_begin_transaction() has been called.errno
to rdkafka error code. \FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|object|string|null
void*int|null
size_t\FFI\CData|object|string|null
const void*int|null
size_t\FFI\CData|object|string|null
void*int|null
int - 0 on success or -1 on error in which case errno is set accordingly:partition
is unknown in the Kafka cluster. (RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION)See also
+ +public static rd_kafka_producev (
+ \FFI\CData|null $rk,
+ mixed $args
+ ): int
+
Produce and send a single message to broker.
+The message is defined by a va-arg list using rd_kafka_vtype_t
tag tuples which must be terminated with a single RD_KAFKA_V_END
.
\FFI\CData|null
rd_kafka_t*mixed
int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR
on success, else an error code as described in rd_kafka_produce(). RD_KAFKA_RESP_ERR__CONFLICT
is returned if _V_HEADER and _V_HEADERS are mixed.See also
+ +public static rd_kafka_produce_batch (
+ \FFI\CData|null $rkt,
+ int|null $partition,
+ int|null $msgflags,
+ \FFI\CData|null $rkmessages,
+ int|null $message_cnt
+ ): int|null
+
Produce multiple messages.
+If partition is RD_KAFKA_PARTITION_UA the configured partitioner will be run for each message (slower), otherwise the messages will be enqueued to the specified partition directly (faster).
+The messages are provided in the array rkmessages
of count message_cnt
elements. The partition
and msgflags
are used for all provided messages.
Honoured rkmessages
[] fields are:
message_cnt
.RD_KAFKA_MSG_F_PARTITION
is set in msgflags
, the
.partition field of the rkmessages
is used instead of partition
.rkmessages
. \FFI\CData|null
rd_kafka_topic_t*int|null
int32_tint|null
int\FFI\CData|null
rd_kafka_message_t*int|null
intint|null
int - the number of messages succesfully enqueued for producing.See also
+ +public static rd_kafka_flush (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): int
+
Wait until all outstanding produce requests, et.al, are completed. This should typically be done prior to destroying a producer instance to make sure all queued and in-flight produce requests are completed before terminating.
+linger.ms
time will be ignored for the duration of the call, queued messages will be sent to the broker as soon as possible.\FFI\CData|null
rd_kafka_t*int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__TIMED_OUT if timeout_ms
was reached before all outstanding requests were completed, else RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_purge (
+ \FFI\CData|null $rk,
+ int|null $purge_flags
+ ): int
+
Purge messages currently handled by the producer instance.
+ +The application will need to call rd_kafka_poll() or rd_kafka_flush() afterwards to serve the delivery report callbacks of the purged messages.
+Messages purged from internal queues fail with the delivery report error code set to RD_KAFKA_RESP_ERR__PURGE_QUEUE, while purged messages that are in-flight to or from the broker will fail with the error code set to RD_KAFKA_RESP_ERR__PURGE_INFLIGHT.
+\FFI\CData|null
rd_kafka_t* - Client instance.int|null
int - Tells which messages to purge and how.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, RD_KAFKA_RESP_ERR__INVALID_ARG if the purge
flags are invalid or unknown, RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED if called on a non-producer client instance.See also
+ +public static rd_kafka_metadata (
+ \FFI\CData|null $rk,
+ int|null $all_topics,
+ \FFI\CData|null $only_rkt,
+ \FFI\CData|null $metadatap,
+ int|null $timeout_ms
+ ): int
+
Request Metadata from broker.
+Parameters:
+all_topics
if non-zero: request info about all topics in cluster, if zero: only request info about locally known topics.only_rkt
only request info about this topicmetadatap
pointer to hold metadata result. The *metadatap
pointer must be released with rd_kafka_metadata_destroy().timeout_ms
maximum response time before failing.all_topics
is non-zero the Metadata response information may trigger a re-join if any subscribed topics have changed partition count or existence state.\FFI\CData|null
rd_kafka_t*int|null
int\FFI\CData|null
rd_kafka_topic_t*\FFI\CData|null
const struct rd_kafka_metadata**int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success (in which case *metadatap) will be set, else RD_KAFKA_RESP_ERR__TIMED_OUT on timeout or other error code on error.See also
+ +public static rd_kafka_metadata_destroy (
+ \FFI\CData|\Closure $metadata
+ ): void
+
\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_metadata*)(rd_kafka_t*, int, rd_kafka_topic_t*, const struct rd_kafka_metadata**, int)public static rd_kafka_list_groups (
+ \FFI\CData|null $rk,
+ string|null $group,
+ \FFI\CData|null $grplistp,
+ int|null $timeout_ms
+ ): int
+
List and describe client groups in cluster.
+group
is an optional group name to describe, otherwise (NULL
) all groups are returned.
timeout_ms
is the (approximate) maximum time to wait for response from brokers and must be a positive value.
The grplistp
remains untouched if any error code is returned, with the exception of RD_KAFKA_RESP_ERR__PARTIAL which behaves as RD_KAFKA_RESP_ERR__NO_ERROR (success) but with an incomplete group list.
\FFI\CData|null
rd_kafka_t*string|null
const char*\FFI\CData|null
const struct rd_kafka_group_list**int|null
intint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR__NO_ERROR
on success and grplistp
is updated to point to a newly allocated list of groups. RD_KAFKA_RESP_ERR__PARTIAL
if not all brokers responded in time but at least one group is returned in grplistlp
. RD_KAFKA_RESP_ERR__TIMED_OUT
if no groups were returned in the given timeframe but not all brokers have yet responded, or if the list of brokers in the cluster could not be obtained within the given timeframe. RD_KAFKA_RESP_ERR__TRANSPORT
if no brokers were found. Other error codes may also be returned from the request layer.See also
+ +public static rd_kafka_group_list_destroy (
+ \FFI\CData|null $grplist
+ ): void
+
\FFI\CData|null
const struct rd_kafka_group_list*public static rd_kafka_brokers_add (
+ \FFI\CData|null $rk,
+ string|null $brokerlist
+ ): int|null
+
Adds one or more brokers to the kafka handle's list of initial bootstrap brokers.
+Additional brokers will be discovered automatically as soon as rdkafka connects to a broker by querying the broker metadata.
+If a broker name resolves to multiple addresses (and possibly address families) all will be used for connection attempts in round-robin fashion.
+brokerlist
is a ,-separated list of brokers in the format: <broker1>
,<broker2>,.. Where each broker is in either the host or URL based format: <host>
[:<port>] <proto>
://<host>[:port] <proto>
is either PLAINTEXT
, SSL
, SASL
, SASL_PLAINTEXT
The two formats can be mixed but ultimately the value of the security.protocol
config property decides what brokers are allowed.
Example: brokerlist = "broker1:10000,broker2" brokerlist = "SSL://broker3:9000,ssl://broker2"
+ +metadata.broker.list
or bootstrap.servers
configuration property (preferred method).bootstrap.servers
configuration property. \FFI\CData|null
rd_kafka_t*string|null
const char*int|null
int - the number of brokers successfully added.See also
+ +public static rd_kafka_set_logger (
+ \FFI\CData|null $rk,
+ \FFI\CData|\Closure $func
+ ): void
+
Set logger function.
+The default is to print to stderr, but a syslog logger is also available, see rd_kafka_log_(print|syslog) for the builtin alternatives. Alternatively the application may provide its own logger callback. Or pass 'func' as NULL to disable logging.
+rk
may be passed as NULL in the callback. \FFI\CData|null
rd_kafka_t*\FFI\CData|\Closure
void()(const rd_kafka_t, int, const char*, const char*)See also
+ +public static rd_kafka_set_log_level (
+ \FFI\CData|null $rk,
+ int|null $level
+ ): void
+
Specifies the maximum logging level emitted by internal kafka logging and debugging.
+"log_level"
configuration property instead."debug"
configuration property is set the log level is automatically adjusted to LOG_DEBUG
(7). \FFI\CData|null
rd_kafka_t*int|null
intSee also
+ +public static rd_kafka_log_print (
+ \FFI\CData|null $rk,
+ int|null $level,
+ string|null $fac,
+ string|null $buf
+ ): void
+
\FFI\CData|null
const rd_kafka_t*int|null
intstring|null
const char*string|null
const char*public static rd_kafka_log_syslog (
+ \FFI\CData|null $rk,
+ int|null $level,
+ string|null $fac,
+ string|null $buf
+ ): void
+
Builtin log sink: print to syslog.
+\FFI\CData|null
const rd_kafka_t*int|null
intstring|null
const char*string|null
const char*See also
+ +public static rd_kafka_outq_len (
+ \FFI\CData|null $rk
+ ): int|null
+
Returns the current out queue length.
+The out queue length is the sum of:
+An application should wait for the return value of this function to reach zero before terminating to make sure outstanding messages, requests (such as offset commits), callbacks and events are fully processed. See rd_kafka_flush().
+ +\FFI\CData|null
rd_kafka_t* - )int|null
int - number of messages and events waiting in queues.See also
+ +public static rd_kafka_dump (
+ \FFI\CData|null $fp,
+ \FFI\CData|null $rk
+ ): void
+
Dumps rdkafka's internal state for handle rk
to stream fp
.
This is only useful for debugging rdkafka, showing state and statistics for brokers, topics, partitions, etc.
+ +\FFI\CData|null
FILE*\FFI\CData|null
rd_kafka_t*See also
+ +public static rd_kafka_thread_cnt ( ): int|null
+
Retrieve the current number of threads in use by librdkafka.
+Used by regression tests.
+ +int|null
int - )See also
+ +public static rd_kafka_wait_destroyed (
+ int|null $timeout_ms
+ ): int|null
+
Wait for all rd_kafka_t objects to be destroyed.
+Returns 0 if all kafka objects are now destroyed, or -1 if the timeout was reached.
+int|null
int - )int|null
intSee also
+ +public static rd_kafka_unittest ( ): int|null
+
Run librdkafka's built-in unit-tests.
+ +int|null
int - ) - the number of failures, or 0 if all tests passed.See also
+ +public static rd_kafka_poll_set_consumer (
+ \FFI\CData|null $rk
+ ): int
+
Redirect the main (rd_kafka_poll()) queue to the KafkaConsumer's queue (rd_kafka_consumer_poll()).
+\FFI\CData|null
rd_kafka_t* - )int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_event_type (
+ \FFI\CData|null $rkev
+ ): int|null
+
rkev
as NULL in which case RD_KAFKA_EVENT_NONE is returned. \FFI\CData|null
const rd_kafka_event_t* - )int|null
rd_kafka_event_type_t - the event type for the given event.See also
+ +public static rd_kafka_event_name (
+ \FFI\CData|null $rkev
+ ): string|null
+
rkev
as NULL in which case the name for RD_KAFKA_EVENT_NONE is returned. \FFI\CData|null
const rd_kafka_event_t* - )string|null
const char* - the event type’s name for the given event.See also
+ +public static rd_kafka_event_destroy (
+ \FFI\CData|null $rkev
+ ): void
+
Destroy an event.
+rkev
as NULL in which case no action is performed. \FFI\CData|null
rd_kafka_event_t* - )See also
+ +public static rd_kafka_event_message_next (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Call repeatedly until it returns NULL.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_message_t* - the next message from an event.See also
+ +public static rd_kafka_event_message_array (
+ \FFI\CData|null $rkev,
+ \FFI\CData|null $rkmessages,
+ int|null $size
+ ): int|null
+
Extacts size
message(s) from the event into the pre-allocated array rkmessages
.
Event types:
+\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_message_t**int|null
size_tint|null
size_t - the number of messages extracted.See also
+ +public static rd_kafka_event_message_count (
+ \FFI\CData|null $rkev
+ ): int|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )int|null
size_t - the number of remaining messages in the event.See also
+ +public static rd_kafka_event_error (
+ \FFI\CData|null $rkev
+ ): int
+
Use rd_kafka_event_error_is_fatal() to detect if this is a fatal error.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )int
rd_kafka_resp_err_t - the error code for the event.See also
+ +public static rd_kafka_event_error_string (
+ \FFI\CData|null $rkev
+ ): string|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )string|null
const char* - the error string (if any). An application should check that rd_kafka_event_error() returns non-zero before calling this function.See also
+ +public static rd_kafka_event_error_is_fatal (
+ \FFI\CData|null $rkev
+ ): int|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )int|null
int - 1 if the error is a fatal error, else 0.See also
+ +public static rd_kafka_event_opaque (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|object|string|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|object|string|null
void* - the event opaque (if any) as passed to rd_kafka_commit() (et.al) or rd_kafka_AdminOptions_set_opaque(), depending on event type.See also
+ +public static rd_kafka_event_log (
+ \FFI\CData|null $rkev,
+ \FFI\CData|null $fac,
+ \FFI\CData|null $str,
+ \FFI\CData|null $level
+ ): int|null
+
Extract log message from the event.
+Event types:
+\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const char**\FFI\CData|null
const char**\FFI\CData|null
int*int|null
int - 0 on success or -1 if unsupported event type.See also
+ +public static rd_kafka_event_stats (
+ \FFI\CData|null $rkev
+ ): string|null
+
Extract stats from the event.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )string|null
const char* - stats json string.See also
+ +public static rd_kafka_event_topic_partition_list (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types:
+\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
rd_kafka_topic_partition_list_t* - the topic partition list from the event.See also
+ +public static rd_kafka_event_topic_partition (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_ERROR (for partition level errors)
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
rd_kafka_topic_partition_t* - a newly allocated topic_partition container, if applicable for the event type, else NULL.See also
+ +public static rd_kafka_event_CreateTopics_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get CreateTopics result.
+ +Event types: RD_KAFKA_EVENT_CREATETOPICS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_CreateTopics_result_t* - the result of a CreateTopics request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteTopics_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DeleteTopics result.
+ +Event types: RD_KAFKA_EVENT_DELETETOPICS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteTopics_result_t* - the result of a DeleteTopics request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_CreatePartitions_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get CreatePartitions result.
+ +Event types: RD_KAFKA_EVENT_CREATEPARTITIONS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_CreatePartitions_result_t* - the result of a CreatePartitions request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_AlterConfigs_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get AlterConfigs result.
+ +Event types: RD_KAFKA_EVENT_ALTERCONFIGS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_AlterConfigs_result_t* - the result of a AlterConfigs request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeConfigs_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DescribeConfigs result.
+ +Event types: RD_KAFKA_EVENT_DESCRIBECONFIGS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeConfigs_result_t* - the result of a DescribeConfigs request, or NULL if event is of different type.See also
+ +public static rd_kafka_queue_poll (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Poll a queue for an event for max timeout_ms
.
\FFI\CData|null
rd_kafka_queue_t*int|null
int\FFI\CData|null
rd_kafka_event_t* - an event, or NULL.See also
+ +public static rd_kafka_queue_poll_callback (
+ \FFI\CData|null $rkqu,
+ int|null $timeout_ms
+ ): int|null
+
Poll a queue for events served through callbacks for max timeout_ms
.
\FFI\CData|null
rd_kafka_queue_t*int|null
intint|null
int - the number of events served.See also
+ +public static rd_kafka_plugin_f_conf_init_t (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $plug_opaquep,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Plugin's configuration initializer method called each time the library is referenced from configuration (even if previously loaded by another client instance).
+conf_init
\FFI\CData|null
rd_kafka_conf_t* - Configuration set up to this point.\FFI\CData|object|string|null
void** - Plugin can set this pointer to a per-configuration opaque pointer.\FFI\CData|null
char* - String buffer of size errstr_size
where plugin must write a human readable error string in the case the initializer fails (returns non-zero). - Maximum space (including \0) in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error.See also
+ +public static rd_kafka_interceptor_f_on_conf_set_t (
+ \FFI\CData|null $conf,
+ string|null $name,
+ string|null $val,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_conf_set() is called from rd_kafka_*_conf_set() in the order the interceptors were added.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - The configuration property to set.string|null
const char* - The configuration value to set, or NULL for reverting to default in which case the previous value should be freed.\FFI\CData|null
char* - A human readable error string in case the interceptor fails.int|null
size_t - Maximum space (including \0) in errstr
.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK if the property was known and successfully handled by the interceptor, RD_KAFKA_CONF_INVALID if the property was handled by the interceptor but the value was invalid, or RD_KAFKA_CONF_UNKNOWN if the interceptor did not handle this property, in which case the property is passed on on the interceptor in the chain, finally ending up at the built-in configuration handler.See also
+ +public static rd_kafka_interceptor_f_on_conf_dup_t (
+ \FFI\CData|null $new_conf,
+ \FFI\CData|null $old_conf,
+ int|null $filter_cnt,
+ \FFI\CData|null $filter,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_conf_dup() is called from rd_kafka_conf_dup() in the order the interceptors were added and is used to let an interceptor re-register its conf interecptors with a new opaque value. The on_conf_dup() method is called prior to the configuration from old_conf
being copied to new_conf
.
\FFI\CData|null
rd_kafka_conf_t* - New configuration object.\FFI\CData|null
const rd_kafka_conf_t* - Old configuration object to copy properties from.int|null
size_t - Number of property names to filter in filter
. - Property names to filter out (ignore) when setting up new_conf
.\FFI\CData|null
const char**\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure (which is logged but otherwise ignored).See also
+ +public static rd_kafka_interceptor_f_on_conf_destroy_t (
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_conf_destroy() is called from rd_kafka_*_conf_destroy() in the order the interceptors were added.
+ +\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_interceptor_f_on_new_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $ic_opaque,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
on_new() is called from rd_kafka_new() prior toreturning the newly created client instance to the application.
+ +rk
client instance will not be fully set up when this interceptor is called and the interceptor MUST NOT call any other rk-specific APIs than rd_kafka_interceptor_add..(). \FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
const rd_kafka_conf_t* - The client instance’s final configuration.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().\FFI\CData|null
char* - A human readable error string in case the interceptor fails.int|null
size_t - Maximum space (including \0) in errstr
.int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_destroy_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_destroy() is called from rd_kafka_destroy() or (rd_kafka_new() if rd_kafka_new() fails during initialization).
+ +\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_tSee also
+ +public static rd_kafka_interceptor_f_on_send_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_send() is called from rd_kafka_produce*() (et.al) prior to the partitioner being called.
+ +rkmessage
object is NOT mutable and MUST NOT be modified by the interceptor.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
rd_kafka_message_t* - The message being produced. Immutable.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_acknowledgement_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_acknowledgement() is called to inform interceptors that a message was succesfully delivered or permanently failed delivery. The interceptor chain is called from internal librdkafka background threads, or rd_kafka_produce*() if the partitioner failed.
+ +rkmessage
object is NOT mutable and MUST NOT be modified by the interceptor.rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
rd_kafka_message_t* - The message being produced. Immutable.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_consume_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkmessage,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_consume() is called just prior to passing the message to the application in rd_kafka_consumer_poll(), rd_kafka_consume*(), the event interface, etc.
+ +rkmessage
object is NOT mutable and MUST NOT be modified by the interceptor.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
rd_kafka_message_t* - The message being consumed. Immutable.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_commit_t (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ int $err,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_commit() is called on completed or failed offset commit. It is called from internal librdkafka threads.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - List of topic+partition+offset+error that were committed. The error message of each partition should be checked for error.int
rd_kafka_resp_err_t - The commit error, if any.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_request_sent_t (
+ \FFI\CData|null $rk,
+ int|null $sockfd,
+ string|null $brokername,
+ int|null $brokerid,
+ int|null $ApiKey,
+ int|null $ApiVersion,
+ int|null $CorrId,
+ int|null $size,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_request_sent() is called when a request has been fully written to a broker TCP connections socket.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int|null
int - Socket file descriptor.string|null
const char* - Broker request is being sent to.int|null
int32_t - Broker request is being sent to.int|null
int16_t - Kafka protocol request type.int|null
int16_t - Kafka protocol request type version.int|null
int32_t - Kafka protocol request correlation id.int|null
size_t - Size of request.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_conf_interceptor_add_on_conf_set (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_conf_set,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_conf_set() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_conf_res_t(rd_kafka_interceptor_f_on_conf_set_t*)(rd_kafka_conf_t*, const char*, const char*, char*, size_t, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_conf_interceptor_add_on_conf_dup (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_conf_dup,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_conf_dup() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_conf_dup_t*)(rd_kafka_conf_t*, const rd_kafka_conf_t*, size_t, const char**, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_conf_interceptor_add_on_conf_destroy (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_conf_destroy,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_conf_destroy() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_conf_destroy_t*)(void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERRORSee also
+ +public static rd_kafka_conf_interceptor_add_on_new (
+ \FFI\CData|null $conf,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_new,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_new() interceptor.
+ +\FFI\CData|null
rd_kafka_conf_t* - Configuration object.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_new_t*)(rd_kafka_t*, const rd_kafka_conf_t*, void*, char*, size_t) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_destroy (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_destroy,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_destroy() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_destroy_t*)(rd_kafka_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_send (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_send,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_send() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_send_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing intercepted with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_acknowledgement (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_acknowledgement,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_acknowledgement() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_acknowledgement_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_consume (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_consume,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_consume() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_consume_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_commit (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_commit,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_commit() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_commit_t*)(rd_kafka_t*, const rd_kafka_topic_partition_list_t*, rd_kafka_resp_err_t, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_request_sent (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_request_sent,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_request_sent() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_request_sent_t*)(rd_kafka_t*, int, const char*, int32_t, int16_t, int16_t, int32_t, size_t, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_topic_result_error (
+ \FFI\CData|null $topicres
+ ): int
+
Topic result provides per-topic operation result information.
+ +\FFI\CData|null
const rd_kafka_topic_result_t* - )int
rd_kafka_resp_err_t - the error code for the given topic result.See also
+ +public static rd_kafka_topic_result_error_string (
+ \FFI\CData|null $topicres
+ ): string|null
+
topicres
. \FFI\CData|null
const rd_kafka_topic_result_t* - )string|null
const char* - the human readable error string for the given topic result, or NULL if there was no error.See also
+ +public static rd_kafka_topic_result_name (
+ \FFI\CData|null $topicres
+ ): string|null
+
topicres
. \FFI\CData|null
const rd_kafka_topic_result_t* - )string|null
const char* - the name of the topic for the given topic result.See also
+ +public static rd_kafka_AdminOptions_new (
+ \FFI\CData|null $rk,
+ int $for_api
+ ): \FFI\CData|null
+
Create a new AdminOptions object.
+The options object is not modified by the Admin API request APIs, + (e.g. CreateTopics) and may be reused for multiple calls. + ++ +
\FFI\CData|null
rd_kafka_t* - Client instance.int
rd_kafka_admin_op_t - Specifies what Admin API this AdminOptions object will be used for, which will enforce what AdminOptions_set_..() calls may be used based on the API, causing unsupported set..() calls to fail. Specifying RD_KAFKA_ADMIN_OP_ANY disables the enforcement allowing any option to be set, even if the option is not used in a future call to an Admin API method.\FFI\CData|null
rd_kafka_AdminOptions_t* - a new AdminOptions object (which must be freed with rd_kafka_AdminOptions_destroy()), or NULL if for_api
was set to an unknown API op type.See also
+ +public static rd_kafka_AdminOptions_destroy (
+ \FFI\CData|null $options
+ ): void
+
\FFI\CData|null
rd_kafka_AdminOptions_t*public static rd_kafka_AdminOptions_set_request_timeout (
+ \FFI\CData|null $options,
+ int|null $timeout_ms,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets the overall request timeout, including broker lookup, request transmission, operation time on broker, and response.
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Timeout in milliseconds. Defaults to socket.timeout.ms
.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or RD_KAFKA_RESP_ERR__INVALID_ARG if timeout was out of range in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_operation_timeout (
+ \FFI\CData|null $options,
+ int|null $timeout_ms,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Sets the broker's operation timeout, such as the timeout for CreateTopics to complete the creation of topics on the controller before returning a result to the application.
+CreateTopics: values <= 0 will return immediately after triggering topic creation, while > 0 will wait this long for topic creation to propagate in cluster. Default: 60 seconds.
+DeleteTopics: same semantics as CreateTopics. CreatePartitions: same semantics as CreateTopics.
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Timeout in milliseconds.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or RD_KAFKA_RESP_ERR__INVALID_ARG if timeout was out of range in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_validate_only (
+ \FFI\CData|null $options,
+ int|null $true_or_false,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Tell broker to only validate the request, without performing the requested operation (create topics, etc).
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Defaults to false.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_broker (
+ \FFI\CData|null $options,
+ int|null $broker_id,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Override what broker the Admin request will be sent to.
+By default, Admin requests are sent to the controller broker, with the following exceptions:
+\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin Options.int|null
int32_t - The broker to send the request to.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on failure in which case an error string will be written errstr
.See also
+ +public static rd_kafka_AdminOptions_set_opaque (
+ \FFI\CData|null $options,
+ \FFI\CData|object|string|null $opaque
+ ): void
+
\FFI\CData|null
rd_kafka_AdminOptions_t*\FFI\CData|object|string|null
void*public static rd_kafka_NewTopic_new (
+ string|null $topic,
+ int|null $num_partitions,
+ int|null $replication_factor,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new NewTopic object. This object is later passed to rd_kafka_CreateTopics().
+ +string|null
const char* - Topic name to create.int|null
int - Number of partitions in topic, or -1 to use the broker’s default partition count (>= 2.4.0).int|null
int - Default replication factor for the topic’s partitions, or -1 to use the broker’s default replication factor (>= 2.4.0) or if set_replica_assignment() will be used.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_t\FFI\CData|null
rd_kafka_NewTopic_t* - a new allocated NewTopic object, or NULL if the input parameters are invalid. Use rd_kafka_NewTopic_destroy() to free object when done.See also
+ +public static rd_kafka_NewTopic_destroy (
+ \FFI\CData|null $new_topic
+ ): void
+
\FFI\CData|null
rd_kafka_NewTopic_t*public static rd_kafka_NewTopic_destroy_array (
+ \FFI\CData|null $new_topics,
+ int|null $new_topic_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_NewTopic_t**int|null
size_tpublic static rd_kafka_NewTopic_set_replica_assignment (
+ \FFI\CData|null $new_topic,
+ int|null $partition,
+ \FFI\CData|null $broker_ids,
+ int|null $broker_id_cnt,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set the replica (broker) assignment for partition
to the replica set in broker_ids
(of broker_id_cnt
elements).
replication_factor
of -1.\FFI\CData|null
rd_kafka_NewTopic_t*int|null
int32_t\FFI\CData|null
int32_t*int|null
size_t\FFI\CData|null
char*int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or an error code if the arguments were invalid.See also
+ +public static rd_kafka_NewTopic_set_config (
+ \FFI\CData|null $new_topic,
+ string|null $name,
+ string|null $value
+ ): int
+
Set (broker-side) topic configuration name/value pair.
+\FFI\CData|null
rd_kafka_NewTopic_t*string|null
const char*string|null
const char*int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or an error code if the arguments were invalid.See also
+ +public static rd_kafka_CreateTopics (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $new_topics,
+ int|null $new_topic_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Create topics in cluster as specified by the new_topics
array of size new_topic_cnt
elements.
Supported admin options:
+RD_KAFKA_EVENT_CREATETOPICS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_NewTopic_t** - Array of new topics to create.int|null
size_t - Number of elements in new_topics
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_CreateTopics_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of topic results from a CreateTopics result.
+The returned topics
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_CreateTopics_result_t* - Result to get topics from.\FFI\CData|null
size_t* - Updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_topic_result_t**See also
+ +public static rd_kafka_DeleteTopic_new (
+ string|null $topic
+ ): \FFI\CData|null
+
Create a new DeleteTopic object. This object is later passed to rd_kafka_DeleteTopics().
+ +string|null
const char* - ) - Topic name to delete.\FFI\CData|null
rd_kafka_DeleteTopic_t* - a new allocated DeleteTopic object. Use rd_kafka_DeleteTopic_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteTopic_destroy (
+ \FFI\CData|null $del_topic
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteTopic_t*public static rd_kafka_DeleteTopic_destroy_array (
+ \FFI\CData|null $del_topics,
+ int|null $del_topic_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteTopic_t**int|null
size_tpublic static rd_kafka_DeleteTopics (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_topics,
+ int|null $del_topic_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete topics from cluster as specified by the topics
array of size topic_cnt
elements.
RD_KAFKA_EVENT_DELETETOPICS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteTopic_t** - Array of topics to delete.int|null
size_t - Number of elements in topics
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteTopics_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of topic results from a DeleteTopics result.
+The returned topics
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteTopics_result_t* - Result to get topic results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_topic_result_t**See also
+ +public static rd_kafka_NewPartitions_new (
+ string|null $topic,
+ int|null $new_total_cnt,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new NewPartitions. This object is later passed to rd_kafka_CreatePartitions() to increase the number of partitions to new_total_cnt
for an existing topic.
string|null
const char* - Topic name to create more partitions for.int|null
size_t - Increase the topic’s partition count to this value.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_t\FFI\CData|null
rd_kafka_NewPartitions_t* - a new allocated NewPartitions object, or NULL if the input parameters are invalid. Use rd_kafka_NewPartitions_destroy() to free object when done.See also
+ +public static rd_kafka_NewPartitions_destroy (
+ \FFI\CData|null $new_parts
+ ): void
+
\FFI\CData|null
rd_kafka_NewPartitions_t*public static rd_kafka_NewPartitions_destroy_array (
+ \FFI\CData|null $new_parts,
+ int|null $new_parts_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_NewPartitions_t**int|null
size_tpublic static rd_kafka_NewPartitions_set_replica_assignment (
+ \FFI\CData|null $new_parts,
+ int|null $new_partition_idx,
+ \FFI\CData|null $broker_ids,
+ int|null $broker_id_cnt,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set the replica (broker id) assignment for new_partition_idx
to the replica set in broker_ids
(of broker_id_cnt
elements).
new_partition_idx
0 is the first new partition, 1 is the second, and so on.broker_id_cnt
should match the topic's replication factor.\FFI\CData|null
rd_kafka_NewPartitions_t*int|null
int32_t\FFI\CData|null
int32_t*int|null
size_t\FFI\CData|null
char*int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success, or an error code if the arguments were invalid.See also
+ +public static rd_kafka_CreatePartitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $new_parts,
+ int|null $new_parts_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Create additional partitions for the given topics, as specified by the new_parts
array of size new_parts_cnt
elements.
Supported admin options:
+RD_KAFKA_EVENT_CREATEPARTITIONS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_NewPartitions_t** - Array of topics for which new partitions are to be created.int|null
size_t - Number of elements in new_parts
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_CreatePartitions_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of topic results from a CreatePartitions result.
+The returned topics
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_CreatePartitions_result_t* - Result o get topic results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_topic_result_t**See also
+ +public static rd_kafka_ConfigSource_name (
+ int $confsource
+ ): string|null
+
int
rd_kafka_ConfigSource_t - )string|null
const char* - a string representation of the confsource
.See also
+ +public static rd_kafka_ConfigEntry_name (
+ \FFI\CData|null $entry
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )string|null
const char* - the configuration property nameSee also
+ +public static rd_kafka_ConfigEntry_value (
+ \FFI\CData|null $entry
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )string|null
const char* - the configuration value, may be NULL for sensitive or unset properties.See also
+ +public static rd_kafka_ConfigEntry_source (
+ \FFI\CData|null $entry
+ ): int
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int
rd_kafka_ConfigSource_t - the config source.See also
+ +public static rd_kafka_ConfigEntry_is_read_only (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if the config property is read-only on the broker, else 0.See also
+ +public static rd_kafka_ConfigEntry_is_default (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if the config property is set to its default value on the broker, else 0.See also
+ +public static rd_kafka_ConfigEntry_is_sensitive (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if the config property contains sensitive information (such as security configuration), else 0.See also
+ +public static rd_kafka_ConfigEntry_is_synonym (
+ \FFI\CData|null $entry
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ConfigEntry_t* - )int|null
int - 1 if this entry is a synonym, else 0.See also
+ +public static rd_kafka_ConfigEntry_synonyms (
+ \FFI\CData|null $entry,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
conf
. \FFI\CData|null
const rd_kafka_ConfigEntry_t* - Entry to get synonyms for.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigEntry_t** - the synonym config entry array.See also
+ +public static rd_kafka_ResourceType_name (
+ int $restype
+ ): string|null
+
int
rd_kafka_ResourceType_t - )string|null
const char* - a string representation of the restype
See also
+ +public static rd_kafka_ConfigResource_new (
+ int $restype,
+ string|null $resname
+ ): \FFI\CData|null
+
Create new ConfigResource object.
+ +int
rd_kafka_ResourceType_t - The resource type (e.g., RD_KAFKA_RESOURCE_TOPIC)string|null
const char* - The resource name (e.g., the topic name)\FFI\CData|null
rd_kafka_ConfigResource_t* - a newly allocated objectSee also
+ +public static rd_kafka_ConfigResource_destroy (
+ \FFI\CData|null $config
+ ): void
+
\FFI\CData|null
rd_kafka_ConfigResource_t*public static rd_kafka_ConfigResource_destroy_array (
+ \FFI\CData|null $config,
+ int|null $config_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_ConfigResource_t**int|null
size_tpublic static rd_kafka_ConfigResource_set_config (
+ \FFI\CData|null $config,
+ string|null $name,
+ string|null $value
+ ): int
+
Set configuration name value pair.
+ +This will overwrite the current value.
+ +\FFI\CData|null
rd_kafka_ConfigResource_t* - ConfigResource to set config property on.string|null
const char* - Configuration name, depends on resource type.string|null
const char* - Configuration value, depends on resource type and name
. Set to NULL
to revert configuration value to default.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR if config was added to resource, or RD_KAFKA_RESP_ERR__INVALID_ARG on invalid input.See also
+ +public static rd_kafka_ConfigResource_configs (
+ \FFI\CData|null $config,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of config entries from a ConfigResource object.
+The returned object life-times are the same as the config
object.
\FFI\CData|null
const rd_kafka_ConfigResource_t* - ConfigResource to get configs from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigEntry_t**See also
+ +public static rd_kafka_ConfigResource_type (
+ \FFI\CData|null $config
+ ): int
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )int
rd_kafka_ResourceType_t - the ResourceType for config
See also
+ +public static rd_kafka_ConfigResource_name (
+ \FFI\CData|null $config
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )string|null
const char* - the name for config
See also
+ +public static rd_kafka_ConfigResource_error (
+ \FFI\CData|null $config
+ ): int
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )int
rd_kafka_resp_err_t - the error for this resource from an AlterConfigs requestSee also
+ +public static rd_kafka_ConfigResource_error_string (
+ \FFI\CData|null $config
+ ): string|null
+
\FFI\CData|null
const rd_kafka_ConfigResource_t* - )string|null
const char* - the error string for this resource from an AlterConfigs request, or NULL if no error.See also
+ +public static rd_kafka_AlterConfigs (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $configs,
+ int|null $config_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Update the configuration for the specified resources. Updates are not transactional so they may succeed for a subset of the provided resources while the others fail. The configuration for a particular resource is updated atomically, replacing values using the provided ConfigEntrys and reverting unspecified ConfigEntrys to their default values.
+RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_ConfigResource_t**int|null
size_t\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_AlterConfigs_result_resources (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a AlterConfigs result.
+Use rd_kafka_ConfigResource_error()
and rd_kafka_ConfigResource_error_string()
to extract per-resource error results on the returned array elements.
The returned object life-times are the same as the result
object.
\FFI\CData|null
const rd_kafka_AlterConfigs_result_t* - Result object to get resource results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigResource_t** - an array of ConfigResource elements, or NULL if not available.See also
+ +public static rd_kafka_DescribeConfigs (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $configs,
+ int|null $config_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Get configuration for the specified resources in configs
.
The returned configuration includes default values and the rd_kafka_ConfigEntry_is_default() or rd_kafka_ConfigEntry_source() methods may be used to distinguish them from user supplied values.
+The value of config entries where rd_kafka_ConfigEntry_is_sensitive() is true will always be NULL to avoid disclosing sensitive information, such as security settings.
+Configuration entries where rd_kafka_ConfigEntry_is_read_only() is true can't be updated (with rd_kafka_AlterConfigs()).
+Synonym configuration entries are returned if the broker supports it (broker version >= 1.1.0). See rd_kafka_ConfigEntry_synonyms().
+RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource. \FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_ConfigResource_t**int|null
size_t\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*See also
+ +public static rd_kafka_DescribeConfigs_result_resources (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a DescribeConfigs result.
+The returned resources
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DescribeConfigs_result_t* - Result object to get resource results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigResource_t**See also
+ +public static rd_kafka_conf (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
const rd_kafka_conf_t* - the configuration object used by an rd_kafka_t instance. For use with rd_kafka_conf_get(), et.al., to extract configuration properties from a running client.See also
+ +public static rd_kafka_conf_set_oauthbearer_token_refresh_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $oauthbearer_token_refresh_cb
+ ): void
+
Set SASL/OAUTHBEARER token refresh callback in provided conf object.
+ +The SASL/OAUTHBEARER token refresh callback is triggered via rd_kafka_poll() whenever OAUTHBEARER is the SASL mechanism and a token needs to be retrieved, typically based on the configuration defined in sasl.oauthbearer.config
.
The callback should invoke rd_kafka_oauthbearer_set_token() or rd_kafka_oauthbearer_set_token_failure() to indicate success or failure, respectively.
+The refresh operation is eventable and may be received via rd_kafka_queue_poll() with an event type of RD_KAFKA_EVENT_OAUTHBEARER_TOKEN_REFRESH
.
Note that before any SASL/OAUTHBEARER broker connection can succeed the application must call rd_kafka_oauthbearer_set_token() once – either directly or, more typically, by invoking either rd_kafka_poll(), rd_kafka_consumer_poll(), rd_kafka_queue_poll(), etc, in order to cause retrieval of an initial token to occur.
+Alternatively, the application can enable the SASL queue by calling rd_kafka_conf_enable_sasl_queue() on the configuration object prior to creating the client instance, get the SASL queue with rd_kafka_queue_get_sasl(), and either serve the queue manually by calling rd_kafka_queue_poll(), or redirecting the queue to the background thread to have the queue served automatically. For the latter case the SASL queue must be forwarded to the background queue with rd_kafka_queue_forward(). A convenience function is available to automatically forward the SASL queue to librdkafka's background thread, see rd_kafka_sasl_background_callbacks_enable().
+An unsecured JWT refresh handler is provided by librdkafka for development and testing purposes, it is enabled by setting the enable.sasl.oauthbearer.unsecure.jwt
property to true and is mutually exclusive to using a refresh callback.
\FFI\CData|null
rd_kafka_conf_t* - the configuration to mutate.\FFI\CData|\Closure
void()(rd_kafka_t, const char*, void*) - the callback to set; callback function arguments:rk
- Kafka handleoauthbearer_config
- Value of configuration property sasl.oauthbearer.config. opaque
- Application-provided opaque set via rd_kafka_conf_set_opaque()See also
+ +public static rd_kafka_conf_set_ssl_cert_verify_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $ssl_cert_verify_cb
+ ): int
+
Sets the verification callback of the broker certificate.
+The verification callback is triggered from internal librdkafka threads upon connecting to a broker. On each connection attempt the callback will be called for each certificate in the broker's certificate chain, starting at the root certification, as long as the application callback returns 1 (valid certificate). broker_name
and broker_id
correspond to the broker the connection is being made to. The x509_error
argument indicates if OpenSSL's verification of the certificate succeed (0) or failed (an OpenSSL error code). The application may set the SSL context error code by returning 0 from the verify callback and providing a non-zero SSL context error code in x509_error
. If the verify callback sets x509_error
to 0, returns 1, and the original x509_error
was non-zero, the error on the SSL context will be cleared. x509_error
is always a valid pointer to an int.
depth
is the depth of the current certificate in the chain, starting at the root certificate.
The certificate itself is passed in binary DER format in buf
of size size
.
The callback must return 1 if verification succeeds, or 0 if verification fails and then write a human-readable error message to errstr
(limited to errstr_size
bytes, including nul-term).
The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
x509_error
codes. \FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(rd_kafka_t, const char*, int32_t, int*, int, const char*, size_t, char*, size_t, void*)int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK if SSL is supported in this build, else RD_KAFKA_CONF_INVALID.See also
+ +public static rd_kafka_conf_set_ssl_cert (
+ \FFI\CData|null $conf,
+ int $cert_type,
+ int $cert_enc,
+ \FFI\CData|object|string|null $buffer,
+ int|null $size,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set certificate/key cert_type
from the cert_enc
encoded memory at buffer
of size
bytes.
cert_type
will replace the previous value.buffer
set to NULL will clear the configuration for cert_type
.ssl.key.password
configuration property prior to calling this function.ssl.key.pem
and ssl.certificate.pem
configuration properties.ssl.ca.pem
configuration property.\FFI\CData|null
rd_kafka_conf_t* - Configuration object.int
rd_kafka_cert_type_t - Certificate or key type to configure.int
rd_kafka_cert_enc_t - Buffer encoding
type.\FFI\CData|object|string|null
const void* - Memory pointer to encoded certificate or key. The memory is not referenced after this function returns.int|null
size_t - Size of memory at buffer
.\FFI\CData|null
char* - Memory were a human-readable error string will be written on failure.int|null
size_t - Size of errstr
, including space for nul-terminator.int
rd_kafka_conf_res_t - RD_KAFKA_CONF_OK on success or RD_KAFKA_CONF_INVALID if the memory in buffer
is of incorrect encoding, or if librdkafka was not built with SSL support.See also
+ +public static rd_kafka_event_config_string (
+ \FFI\CData|null $rkev
+ ): string|null
+
The returned memory is read-only and its lifetime is the same as the event object.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - )string|null
const char* - the associated configuration string for the event, or NULL if the configuration property is not set or if not applicable for the given event type.See also
+ +public static rd_kafka_oauthbearer_set_token (
+ \FFI\CData|null $rk,
+ string|null $token_value,
+ int|null $md_lifetime_ms,
+ string|null $md_principal_name,
+ \FFI\CData|null $extensions,
+ int|null $extension_size,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): int
+
Set SASL/OAUTHBEARER token and metadata.
+ +The SASL/OAUTHBEARER token refresh callback or event handler should invoke this method upon success. The extension keys must not include the reserved key "`auth`", and all extension keys and values must conform to the required format as per https://tools.ietf.org/html/rfc7628#section-3.1:
+key = 1*(ALPHA) +value = *(VCHAR / SP / HTAB / CR / LF ) ++
\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - the mandatory token value to set, often (but not necessarily) a JWS compact serialization as per https://tools.ietf.org/html/rfc7515#section-3.1.int|null
int64_t - when the token expires, in terms of the number of milliseconds since the epoch.string|null
const char* - the mandatory Kafka principal name associated with the token.\FFI\CData|null
const char** - optional SASL extensions key-value array with extensions_size
elements (number of keys * 2), where [i] is the key and [i+1] is the key’s value, to be communicated to the broker as additional key-value pairs during the initial client response as per https://tools.ietf.org/html/rfc7628#section-3.1. The key-value pairs are copied.int|null
size_t - the number of SASL extension keys plus values, which must be a non-negative multiple of 2.\FFI\CData|null
char* - A human readable error string (nul-terminated) is written to this location that must be of at least errstr_size
bytes. The errstr
is only written in case of error. - Writable size in errstr
.int|null
size_tint
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR
on success, otherwise errstr
set and:RD_KAFKA_RESP_ERR__INVALID_ARG
if any of the arguments are invalid;RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED
if SASL/OAUTHBEARER is not supported by this build;RD_KAFKA_RESP_ERR__STATE
if SASL/OAUTHBEARER is supported but is not configured as the client’s authentication mechanism.See also
+ +public static rd_kafka_oauthbearer_set_token_failure (
+ \FFI\CData|null $rk,
+ string|null $errstr
+ ): int
+
SASL/OAUTHBEARER token refresh failure indicator.
+ +The SASL/OAUTHBEARER token refresh callback or event handler should invoke this method upon failure.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - mandatory human readable error reason for failing to acquire a token.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR
on success, otherwise:RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED
if SASL/OAUTHBEARER is not supported by this build;RD_KAFKA_RESP_ERR__STATE
if SASL/OAUTHBEARER is supported but is not configured as the client’s authentication mechanism,RD_KAFKA_RESP_ERR__INVALID_ARG
if no error string is supplied.See also
+ +public static rd_kafka_interceptor_f_on_thread_start_t (
+ \FFI\CData|null $rk,
+ int $thread_type,
+ string|null $thread_name,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_thread_start() is called from a newly created librdkafka-managed thread.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int
rd_kafka_thread_type_t - Thread type.string|null
const char* - Human-readable thread name, may not be unique.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_f_on_thread_exit_t (
+ \FFI\CData|null $rk,
+ int $thread_type,
+ string|null $thread_name,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_thread_exit() is called just prior to a librdkafka-managed thread exiting from the exiting thread itself.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int
rd_kafka_thread_type_t - Thread type.nstring|null
const char* - Human-readable thread name, may not be unique.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_add_on_thread_start (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_thread_start,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_thread_start() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_thread_start_t*)(rd_kafka_t*, rd_kafka_thread_type_t, const char*, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_interceptor_add_on_thread_exit (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_thread_exit,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_thread_exit() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_thread_exit_t*)(rd_kafka_t*, rd_kafka_thread_type_t, const char*, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_mock_cluster_new (
+ \FFI\CData|null $rk,
+ int|null $broker_cnt
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t*int|null
int\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_cluster_destroy (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_cluster_handle (
+ \FFI\CData|null $mcluster
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_mock_cluster_t*\FFI\CData|null
rd_kafka_t*public static rd_kafka_mock_cluster_bootstraps (
+ \FFI\CData|null $mcluster
+ ): string|null
+
\FFI\CData|null
const rd_kafka_mock_cluster_t*string|null
const char*public static rd_kafka_mock_push_request_errors (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey,
+ int|null $cnt,
+ mixed $args
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tint|null
size_tmixed
public static rd_kafka_mock_topic_set_error (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int $err
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int
rd_kafka_resp_err_tpublic static rd_kafka_mock_partition_set_leader (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
int32_tint|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_partition_set_follower (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
int32_tint|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_partition_set_follower_wmarks (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition,
+ int|null $lo,
+ int|null $hi
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
int32_tint|null
int64_tint|null
int64_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_rack (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ string|null $rack
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tstring|null
const char*int
rd_kafka_resp_err_tpublic static rd_kafka_error_code (
+ \FFI\CData|null $error
+ ): int
+
\FFI\CData|null
const rd_kafka_error_t* - )int
rd_kafka_resp_err_t - the error code for error
or RD_KAFKA_RESP_ERR_NO_ERROR if error
is NULL.See also
+ +public static rd_kafka_error_name (
+ \FFI\CData|null $error
+ ): string|null
+
\FFI\CData|null
const rd_kafka_error_t* - )string|null
const char* - the error code name for error
, e.g, “ERR_UNKNOWN_MEMBER_ID”, or an empty string if error
is NULL.See also
+ +public static rd_kafka_error_string (
+ \FFI\CData|null $error
+ ): string|null
+
\FFI\CData|null
const rd_kafka_error_t* - )string|null
const char* - a human readable error string for error
, or an empty string if error
is NULL.See also
+ +public static rd_kafka_error_is_fatal (
+ \FFI\CData|null $error
+ ): int|null
+
\FFI\CData|null
const rd_kafka_error_t* - )int|null
int - 1 if the error is a fatal error, indicating that the client instance is no longer usable, else 0 (also if error
is NULL).See also
+ +public static rd_kafka_error_is_retriable (
+ \FFI\CData|null $error
+ ): int|null
+
\FFI\CData|null
const rd_kafka_error_t* - )int|null
int - 1 if the operation may be retried, else 0 (also if error
is NULL).See also
+ +public static rd_kafka_error_txn_requires_abort (
+ \FFI\CData|null $error
+ ): int|null
+
\FFI\CData|null
const rd_kafka_error_t* - )int|null
int - 1 if the error is an abortable transaction error in which case the application must call rd_kafka_abort_transaction() and start a new transaction with rd_kafka_begin_transaction() if it wishes to proceed with transactions. Else returns 0 (also if error
is NULL).See also
+ +public static rd_kafka_error_destroy (
+ \FFI\CData|null $error
+ ): void
+
Free and destroy an error object.
+error
. \FFI\CData|null
rd_kafka_error_t* - )See also
+ +public static rd_kafka_error_new (
+ int $code,
+ string|null $fmt,
+ mixed $args
+ ): \FFI\CData|null
+
Create a new error object with error code
and optional human readable error string in fmt
.
This method is mainly to be used for mocking errors in application test code.
+The returned object must be destroyed with rd_kafka_error_destroy().
+ +int
rd_kafka_resp_err_tstring|null
const char*mixed
\FFI\CData|null
rd_kafka_error_t*See also
+ +public static rd_kafka_msg_partitioner_fnv1a (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
FNV-1a partitioner.
+Uses consistent hashing to map identical keys onto identical partitions using FNV-1a hashing.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_msg_partitioner_fnv1a_random (
+ \FFI\CData|null $rkt,
+ \FFI\CData|object|string|null $key,
+ int|null $keylen,
+ int|null $partition_cnt,
+ \FFI\CData|object|string|null $rkt_opaque,
+ \FFI\CData|object|string|null $msg_opaque
+ ): int|null
+
Consistent-Random FNV-1a partitioner.
+Uses consistent hashing to map identical keys onto identical partitions using FNV-1a hashing. Messages without keys will be assigned via the random partitioner.
+The rkt_opaque
argument is the opaque set by rd_kafka_topic_conf_set_opaque(). The msg_opaque
argument is the per-message opaque passed to produce().
\FFI\CData|null
const rd_kafka_topic_t*\FFI\CData|object|string|null
const void*int|null
size_tint|null
int32_t\FFI\CData|object|string|null
void*\FFI\CData|object|string|null
void*int|null
int32_t - a partition between 0 and partition_cnt
- 1.See also
+ +public static rd_kafka_consumer_group_metadata (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_consumer_group_metadata_t* - the current consumer group metadata associated with this consumer, or NULL if rk
is not a consumer configured with a group.id
. This metadata object should be passed to the transactional producer’s rd_kafka_send_offsets_to_transaction() API.See also
+ +public static rd_kafka_consumer_group_metadata_new (
+ string|null $group_id
+ ): \FFI\CData|null
+
Create a new consumer group metadata object. This is typically only used for writing tests.
+ +string|null
const char* - ) - The group id.\FFI\CData|null
rd_kafka_consumer_group_metadata_t*See also
+ +public static rd_kafka_consumer_group_metadata_destroy (
+ \FFI\CData|null $arg0
+ ): void
+
\FFI\CData|null
rd_kafka_consumer_group_metadata_t*public static rd_kafka_consumer_group_metadata_write (
+ \FFI\CData|null $cgmd,
+ \FFI\CData|object|string|null $bufferp,
+ \FFI\CData|null $sizep
+ ): \FFI\CData|null
+
Serialize the consumer group metadata to a binary format. This is mainly for client binding use and not for application use.
+\FFI\CData|null
const rd_kafka_consumer_group_metadata_t* - Metadata to be serialized.\FFI\CData|object|string|null
void** - On success this pointer will be updated to point to na allocated buffer containing the serialized metadata. The buffer must be freed with rd_kafka_mem_free().\FFI\CData|null
size_t* - The pointed to size will be updated with the size of the serialized buffer.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_consumer_group_metadata_read (
+ \FFI\CData|null $cgmdp,
+ \FFI\CData|object|string|null $buffer,
+ int|null $size
+ ): \FFI\CData|null
+
Reads serialized consumer group metadata and returns a consumer group metadata object. This is mainly for client binding use and not for application use.
+\FFI\CData|null
rd_kafka_consumer_group_metadata_t** - On success this pointer will be updated to point to a new consumer group metadata object which must be freed with rd_kafka_consumer_group_metadata_destroy().\FFI\CData|object|string|null
const void* - Pointer to the serialized data.int|null
size_t - Size of the serialized data.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_init_transactions (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Initialize transactions for the producer instance.
+This function ensures any transactions initiated by previous instances of the producer with the same transactional.id
are completed. If the previous instance failed with a transaction in progress the previous transaction will be aborted. This function needs to be called before any other transactional or produce functions are called when the transactional.id
is configured.
If the last transaction had begun completion (following transaction commit) but not yet finished, this function will await the previous transaction's completion.
+When any previous transactions have been fenced this function will acquire the internal producer id and epoch, used in all future transactional messages issued by this producer instance.
+ +timeout_ms
milliseconds.\FFI\CData|null
rd_kafka_t* - Producer instance.int|null
int - The maximum time to block. On timeout the operation may continue in the background, depending on state, and it is okay to call init_transactions() again. If an infinite timeout (-1) is passed, the timeout will be adjusted to 2 * transaction.timeout.ms
.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether a fatal error has been raised by calling rd_kafka_error_is_fatal(). Error codes: RD_KAFKA_RESP_ERR__TIMED_OUT if the transaction coordinator could be not be contacted within timeout_ms
(retriable), RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE if the transaction coordinator is not available (retriable), RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS if a previous transaction would not complete within timeout_ms
(retriable), RD_KAFKA_RESP_ERR__STATE if transactions have already been started or upon fatal error, RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE if the broker(s) do not support transactions (<Apache Kafka 0.11), this also raises a fatal error, RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT if the configured transaction.timeout.ms
is outside the broker-configured range, this also raises a fatal error, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, or timeout_ms
is out of range. Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_begin_transaction (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Begin a new transaction.
+rd_kafka_init_transactions() must have been called successfully (once) before this function is called.
+Upon successful return from this function the application has to perform at least one of the following operations within transaction.timeout.ms
to avoid timing out the transaction on the broker:
Any messages produced, offsets sent (rd_kafka_send_offsets_to_transaction()), etc, after the successful return of this function will be part of the transaction and committed or aborted atomatically.
+Finish the transaction by calling rd_kafka_commit_transaction() or abort the transaction by calling rd_kafka_abort_transaction().
+ +\FFI\CData|null
rd_kafka_t* - ) - Producer instance.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether a fatal error has been raised by calling rd_kafka_error_is_fatal(). Error codes: RD_KAFKA_RESP_ERR__STATE if a transaction is already in progress or upon fatal error, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance. Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_send_offsets_to_transaction (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $offsets,
+ \FFI\CData|null $cgmetadata,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Sends a list of topic partition offsets to the consumer group coordinator for cgmetadata
, and marks the offsets as part part of the current transaction. These offsets will be considered committed only if the transaction is committed successfully.
The offsets should be the next message your application will consume, i.e., the last processed message's offset + 1 for each partition. Either track the offsets manually during processing or use rd_kafka_position() (on the consumer) to get the current offsets for the partitions assigned to the consumer.
+Use this method at the end of a consume-transform-produce loop prior to committing the transaction with rd_kafka_commit_transaction().
+ +enable.auto.commit
to false on the consumer).offsets
will be ignored, if there are no valid offsets in offsets
the function will return NULL and no action will be taken.offsets
and cgmetadata
parameters. Failure to do so risks inconsistent state between what is actually included in the transaction and what the application thinks is included in the transaction.\FFI\CData|null
rd_kafka_t* - Producer instance.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - List of offsets to commit to the consumer group upon successful commit of the transaction. Offsets should be the next message to consume, e.g., last processed message + 1.\FFI\CData|null
const rd_kafka_consumer_group_metadata_t* - The current consumer group metadata as returned by rd_kafka_consumer_group_metadata() on the consumer instance the provided offsets were consumed from.int|null
int - Maximum time allowed to register the offsets on the broker.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether an abortable or fatal error has been raised by calling rd_kafka_error_txn_requires_abort() or rd_kafka_error_is_fatal() respectively. Error codes: RD_KAFKA_RESP_ERR__STATE if not currently in a transaction, RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH if the current producer transaction has been fenced by a newer producer instance, RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED if the producer is no longer authorized to perform transactional operations, RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED if the producer is not authorized to write the consumer offsets to the group coordinator, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, or if the consumer_group_id
or offsets
are empty. Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_commit_transaction (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Commit the current transaction (as started with rd_kafka_begin_transaction()).
+Any outstanding messages will be flushed (delivered) before actually committing the transaction.
+If any of the outstanding messages fail permanently the current transaction will enter the abortable error state and this function will return an abortable error, in this case the application must call rd_kafka_abort_transaction() before attempting a new transaction with rd_kafka_begin_transaction().
+ +timeout_ms
. Using other values risk internal state desynchronization in case any of the underlying protocol requests fail.timeout_ms
expires, which ever comes first. On timeout the application may call the function again.\FFI\CData|null
rd_kafka_t* - Producer instance.int|null
int - The maximum time to block. On timeout the operation may continue in the background, depending on state, and it is okay to call this function again. Pass -1 to use the remaining transaction timeout, this is the recommended use.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether an abortable or fatal error has been raised by calling rd_kafka_error_txn_requires_abort() or rd_kafka_error_is_fatal() respectively. Error codes: RD_KAFKA_RESP_ERR__STATE if not currently in a transaction, RD_KAFKA_RESP_ERR__TIMED_OUT if the transaction could not be complete commmitted within timeout_ms
, this is a retriable error as the commit continues in the background, RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH if the current producer transaction has been fenced by a newer producer instance, RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED if the producer is no longer authorized to perform transactional operations, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_abort_transaction (
+ \FFI\CData|null $rk,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Aborts the ongoing transaction.
+This function should also be used to recover from non-fatal abortable + transaction errors. + +Any outstanding messages will be purged and fail with + RD_KAFKA_RESP_ERR__PURGE_INFLIGHT or RD_KAFKA_RESP_ERR__PURGE_QUEUE. + See rd_kafka_purge() for details. ++
timeout_ms
. Using other values risk internal state desynchronization in case any of the underlying protocol requests fail.timeout_ms
expires, which ever comes first. On timeout the application may call the function again. If the application has enabled RD_KAFKA_EVENT_DR it must serve the event queue in a separate thread since rd_kafka_flush() will not serve delivery reports in this mode.\FFI\CData|null
rd_kafka_t* - Producer instance.int|null
int - The maximum time to block. On timeout the operation may continue in the background, depending on state, and it is okay to call this function again. Pass -1 to use the remaining transaction timeout, this is the recommended use.\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure. Check whether the returned error object permits retrying by calling rd_kafka_error_is_retriable(), or whether a fatal error has been raised by calling rd_kafka_error_is_fatal(). Error codes: RD_KAFKA_RESP_ERR__STATE if not currently in a transaction, RD_KAFKA_RESP_ERR__TIMED_OUT if the transaction could not be complete commmitted within timeout_ms
, this is a retriable error as the commit continues in the background, RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH if the current producer transaction has been fenced by a newer producer instance, RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED if the producer is no longer authorized to perform transactional operations, RD_KAFKA_RESP_ERR__NOT_CONFIGURED if transactions have not been configured for the producer instance, RD_KAFKA_RESP_ERR__INVALID_ARG if rk
is not a producer instance, Other error codes not listed here may be returned, depending on broker version.See also
+ +public static rd_kafka_handle_mock_cluster (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_t*\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_topic_create (
+ \FFI\CData|null $mcluster,
+ string|null $topic,
+ int|null $partition_cnt,
+ int|null $replication_factor
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*int|null
intint|null
intint
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_down (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_up (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_coordinator_set (
+ \FFI\CData|null $mcluster,
+ string|null $key_type,
+ string|null $key,
+ int|null $broker_id
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*string|null
const char*string|null
const char*int|null
int32_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_set_apiversion (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey,
+ int|null $MinVersion,
+ int|null $MaxVersion
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tint|null
int16_tint|null
int16_tint
rd_kafka_resp_err_tpublic static rd_kafka_mock_broker_set_rtt (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $rtt_ms
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
intint
rd_kafka_resp_err_tpublic static rd_kafka_message_errstr (
+ \FFI\CData|null $rkmessage
+ ): string|null
+
Returns the error string for an errored rd_kafka_message_t or NULL if there was no error.
+\FFI\CData|null
const rd_kafka_message_t* - )string|null
const char*See also
+ +public static rd_kafka_message_broker_id (
+ \FFI\CData|null $rkmessage
+ ): int|null
+
Returns the broker id of the broker the message was produced to or fetched from.
+ +\FFI\CData|null
const rd_kafka_message_t* - )int|null
int32_t - a broker id if known, else -1.See also
+ +public static rd_kafka_produceva (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $vus,
+ int|null $cnt
+ ): \FFI\CData|null
+
Produce and send a single message to broker.
+The message is defined by an array of rd_kafka_vu_t
of count cnt
.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_vu_t*int|null
size_t\FFI\CData|null
rd_kafka_error_t* - an error object on failure or NULL on success. See rd_kafka_producev() for specific error codes.See also
+ +public static rd_kafka_event_debug_contexts (
+ \FFI\CData|null $rkev,
+ \FFI\CData|null $dst,
+ int|null $dstsize
+ ): int|null
+
Extract log debug context from event.
+Event types:
+\FFI\CData|null
rd_kafka_event_t* - the event to extract data from.\FFI\CData|null
char* - destination string for comma separated list.int|null
size_t - size of provided dst buffer.int|null
int - 0 on success or -1 if unsupported event type.See also
+ +public static rd_kafka_mock_broker_push_request_errors (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $ApiKey,
+ int|null $cnt,
+ mixed $args
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
int16_tint|null
size_tmixed
int
rd_kafka_resp_err_tpublic static rd_kafka_conf_get_default_topic_conf (
+ \FFI\CData|null $conf
+ ): \FFI\CData|null
+
Gets the default topic configuration as previously set with rd_kafka_conf_set_default_topic_conf() or that was implicitly created by configuring a topic-level property on the global conf
object.
conf
object. It may be modified but not destroyed and its lifetime is the same as the conf
object or the next call to rd_kafka_conf_set_default_topic_conf(). \FFI\CData|null
rd_kafka_conf_t* - )\FFI\CData|null
rd_kafka_topic_conf_t* - the conf’s
default topic configuration (if any), or NULL.See also
+ +public static rd_kafka_queue_yield (
+ \FFI\CData|null $rkqu
+ ): void
+
Cancels the current rd_kafka_queue_poll() on rkqu
.
An application may use this from another thread to force an immediate return to the calling code (caller of rd_kafka_queue_poll()). Must not be used from signal handlers since that may cause deadlocks.
+ +\FFI\CData|null
rd_kafka_queue_t* - )See also
+ +public static rd_kafka_seek_partitions (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions,
+ int|null $timeout_ms
+ ): \FFI\CData|null
+
Seek consumer for partitions in partitions
to the per-partition offset in the .offset field of
partitions
.
The offset may be either absolute (>= 0) or a logical offset.
+If timeout_ms
is specified (not 0) the seek call will wait this long for the consumer to update its fetcher state for the given partition with the new offset. This guarantees that no previously fetched messages for the old offset (or fetch position) will be passed to the application.
If the timeout is reached the internal state will be unknown to the caller and this function returns RD_KAFKA_RESP_ERR__TIMED_OUT
.
If timeout_ms
is 0 it will initiate the seek but return immediately without any error reporting (e.g., async).
This call will purge all pre-fetched messages for the given partition, which may be up to queued.max.message.kbytes
in size. Repeated use of seek may thus lead to increased network usage as messages are re-fetched from the broker.
Individual partition errors are reported in the per-partition .err field of
partitions
.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*int|null
int\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_incremental_assign (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Incrementally add partitions
to the current assignment.
If a COOPERATIVE assignor (i.e. incremental rebalancing) is being used, this method should be used in a rebalance callback to adjust the current assignment appropriately in the case where the rebalance type is RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS. The application must pass the partition list passed to the callback (or a copy of it), even if the list is empty. partitions
must not be NULL. This method may also be used outside the context of a rebalance callback.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*\FFI\CData|null
rd_kafka_error_t* - NULL on success, or an error object if the operation was unsuccessful.See also
+ +public static rd_kafka_incremental_unassign (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Incrementally remove partitions
from the current assignment.
If a COOPERATIVE assignor (i.e. incremental rebalancing) is being used, this method should be used in a rebalance callback to adjust the current assignment appropriately in the case where the rebalance type is RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS. The application must pass the partition list passed to the callback (or a copy of it), even if the list is empty. partitions
must not be NULL. This method may also be used outside the context of a rebalance callback.
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_topic_partition_list_t*\FFI\CData|null
rd_kafka_error_t* - NULL on success, or an error object if the operation was unsuccessful.See also
+ +public static rd_kafka_rebalance_protocol (
+ \FFI\CData|null $rk
+ ): string|null
+
The rebalance protocol currently in use. This will be "NONE" if the consumer has not (yet) joined a group, else it will match the rebalance protocol ("EAGER", "COOPERATIVE") of the configured and selected assignor(s). All configured assignors must have the same protocol type, meaning online migration of a consumer group from using one protocol to another (in particular upgading from EAGER to COOPERATIVE) without a restart is not currently supported.
+ +\FFI\CData|null
rd_kafka_t* - )string|null
const char* - NULL on error, or one of “NONE”, “EAGER”, “COOPERATIVE” on success.See also
+ +public static rd_kafka_assignment_lost (
+ \FFI\CData|null $rk
+ ): int|null
+
Check whether the consumer considers the current assignment to have been lost involuntarily. This method is only applicable for use with a high level subscribing consumer. Assignments are revoked immediately when determined to have been lost, so this method is only useful when reacting to a RD_KAFKA_EVENT_REBALANCE event or from within a rebalance_cb. Partitions that have been lost may already be owned by other members in the group and therefore commiting offsets, for example, may fail.
+\FFI\CData|null
rd_kafka_t* - )int|null
int - Returns 1 if the current partition assignment is considered lost, 0 otherwise.See also
+ +public static rd_kafka_consumer_group_metadata_new_with_genid (
+ string|null $group_id,
+ int|null $generation_id,
+ string|null $member_id,
+ string|null $group_instance_id
+ ): \FFI\CData|null
+
Create a new consumer group metadata object. This is typically only used for writing tests.
+ +string|null
const char* - The group id.int|null
int32_t - The group generation id.string|null
const char* - The group member id.string|null
const char* - The group instance id (may be NULL).\FFI\CData|null
rd_kafka_consumer_group_metadata_t*See also
+ +public static rd_kafka_event_DeleteRecords_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_DELETERECORDS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteRecords_result_t* - the result of a DeleteRecords request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteGroups_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DeleteGroups result.
+ +Event types: RD_KAFKA_EVENT_DELETEGROUPS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteGroups_result_t* - the result of a DeleteGroups request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteConsumerGroupOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DeleteConsumerGroupOffsets result.
+ +Event types: RD_KAFKA_EVENT_DELETECONSUMERGROUPOFFSETS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteConsumerGroupOffsets_result_t* - the result of a DeleteConsumerGroupOffsets request, or NULL if event is of different type.See also
+ +public static rd_kafka_group_result_error (
+ \FFI\CData|null $groupres
+ ): \FFI\CData|null
+
Group result provides per-group operation result information.
+ +groupres
. \FFI\CData|null
const rd_kafka_group_result_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error for the given group result, or NULL on success.See also
+ +public static rd_kafka_group_result_name (
+ \FFI\CData|null $groupres
+ ): string|null
+
groupres
. \FFI\CData|null
const rd_kafka_group_result_t* - )string|null
const char* - the name of the group for the given group result.See also
+ +public static rd_kafka_group_result_partitions (
+ \FFI\CData|null $groupres
+ ): \FFI\CData|null
+
groupres
. \FFI\CData|null
const rd_kafka_group_result_t* - )\FFI\CData|null
const rd_kafka_topic_partition_list_t* - the partitions/offsets for the given group result, if applicable to the request type, else NULL.See also
+ +public static rd_kafka_DeleteRecords_new (
+ \FFI\CData|null $before_offsets
+ ): \FFI\CData|null
+
Create a new DeleteRecords object. This object is later passed to rd_kafka_DeleteRecords().
+before_offsets
must contain topic
, partition
, and offset
is the offset before which the messages will be deleted (exclusive). Set offset
to RD_KAFKA_OFFSET_END (high-watermark) in order to delete all data in the partition.
\FFI\CData|null
const rd_kafka_topic_partition_list_t* - ) - For each partition delete all messages up to but not including the specified offset.\FFI\CData|null
rd_kafka_DeleteRecords_t* - a new allocated DeleteRecords object. Use rd_kafka_DeleteRecords_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteRecords_destroy (
+ \FFI\CData|null $del_records
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteRecords_t*public static rd_kafka_DeleteRecords_destroy_array (
+ \FFI\CData|null $del_records,
+ int|null $del_record_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteRecords_t**int|null
size_tpublic static rd_kafka_DeleteRecords (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_records,
+ int|null $del_record_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete records (messages) in topic partitions older than the offsets provided.
+ +Supported admin options:
+rdkafka
will wait for the request to complete.RD_KAFKA_EVENT_DELETERECORDS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteRecords_t** - The offsets to delete (up to). Currently only one DeleteRecords_t (but containing multiple offsets) is supported.int|null
size_t - The number of elements in del_records, must be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteRecords_result_offsets (
+ \FFI\CData|null $result
+ ): \FFI\CData|null
+
Get a list of topic and partition results from a DeleteRecords result. The returned objects will contain topic
, partition
, offset
and err
. offset
will be set to the post-deletion low-watermark (smallest available offset of all live replicas). err
will be set per-partition if deletion failed.
The returned object's life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteRecords_result_t* - )\FFI\CData|null
const rd_kafka_topic_partition_list_t*See also
+ +public static rd_kafka_DeleteGroup_new (
+ string|null $group
+ ): \FFI\CData|null
+
Create a new DeleteGroup object. This object is later passed to rd_kafka_DeleteGroups().
+ +string|null
const char* - ) - Name of group to delete.\FFI\CData|null
rd_kafka_DeleteGroup_t* - a new allocated DeleteGroup object. Use rd_kafka_DeleteGroup_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteGroup_destroy (
+ \FFI\CData|null $del_group
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteGroup_t*public static rd_kafka_DeleteGroup_destroy_array (
+ \FFI\CData|null $del_groups,
+ int|null $del_group_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteGroup_t**int|null
size_tpublic static rd_kafka_DeleteGroups (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_groups,
+ int|null $del_group_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete groups from cluster as specified by the del_groups
array of size del_group_cnt
elements.
RD_KAFKA_EVENT_DELETEGROUPS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteGroup_t** - Array of groups to delete.int|null
size_t - Number of elements in del_groups
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteGroups_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of group results from a DeleteGroups result.
+The returned groups life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteGroups_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_DeleteConsumerGroupOffsets_new (
+ string|null $group,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Create a new DeleteConsumerGroupOffsets object. This object is later passed to rd_kafka_DeleteConsumerGroupOffsets().
+ +string|null
const char* - Consumer group id.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - Partitions to delete committed offsets for. Only the topic and partition fields are used.\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t* - a new allocated DeleteConsumerGroupOffsets object. Use rd_kafka_DeleteConsumerGroupOffsets_destroy() to free object when done.See also
+ +public static rd_kafka_DeleteConsumerGroupOffsets_destroy (
+ \FFI\CData|null $del_grpoffsets
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t*public static rd_kafka_DeleteConsumerGroupOffsets_destroy_array (
+ \FFI\CData|null $del_grpoffsets,
+ int|null $del_grpoffset_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t**int|null
size_tpublic static rd_kafka_DeleteConsumerGroupOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_grpoffsets,
+ int|null $del_grpoffsets_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.
+ +RD_KAFKA_EVENT_DELETECONSUMERGROUPOFFSETS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_DeleteConsumerGroupOffsets_t** - Array of group committed offsets to delete. MUST only be one single element.int|null
size_t - Number of elements in del_grpoffsets
array. MUST always be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteConsumerGroupOffsets_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of results from a DeleteConsumerGroupOffsets result.
+The returned groups life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteConsumerGroupOffsets_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_mock_clear_request_errors (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tpublic static rd_kafka_mock_push_request_errors_array (
+ \FFI\CData|null $mcluster,
+ int|null $ApiKey,
+ int|null $cnt,
+ \FFI\CData|null $errors
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int16_tint|null
size_t\FFI\CData|null
const rd_kafka_resp_err_t*public static rd_kafka_interceptor_f_on_response_received_t (
+ \FFI\CData|null $rk,
+ int|null $sockfd,
+ string|null $brokername,
+ int|null $brokerid,
+ int|null $ApiKey,
+ int|null $ApiVersion,
+ int|null $CorrId,
+ int|null $size,
+ int|null $rtt,
+ int $err,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_response_received() is called when a protocol response has been fully received from a broker TCP connection socket but before the response payload is parsed.
+ +rk
, or perform any blocking or prolonged work.\FFI\CData|null
rd_kafka_t* - The client instance.int|null
int - Socket file descriptor (always -1).string|null
const char* - Broker response was received from, possibly empty string on error.int|null
int32_t - Broker response was received from.int|null
int16_t - Kafka protocol request type or -1 on error.int|null
int16_t - Kafka protocol request type version or -1 on error.int|null
int32_t - Kafka protocol request correlation id, possibly -1 on error.int|null
size_t - Size of response, possibly 0 on error.int|null
int64_t - Request round-trip-time in microseconds, possibly -1 on error.int
rd_kafka_resp_err_t - Receive error.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_add_on_response_received (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_response_received,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_response_received() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_response_received_t*)(rd_kafka_t*, int, const char*, int32_t, int16_t, int16_t, int32_t, size_t, int64_t, rd_kafka_resp_err_t, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_conf_set_engine_callback_data (
+ \FFI\CData|null $conf,
+ \FFI\CData|object|string|null $callback_data
+ ): void
+
Set callback_data for OpenSSL engine.
+ +ssl.engine.location
configuration must be set for this to have affect.value
must remain valid for the lifetime of the configuration object and any Kafka clients that use it. \FFI\CData|null
rd_kafka_conf_t* - Configuration object.\FFI\CData|object|string|null
void* - passed to engine callbacks, e.g. ENGINE_load_ssl_client_cert
.See also
+ +public static rd_kafka_mem_calloc (
+ \FFI\CData|null $rk,
+ int|null $num,
+ int|null $size
+ ): \FFI\CData|object|string|null
+
Allocate and zero memory using the same allocator librdkafka uses.
+This is typically an abstraction for the calloc(3) call and makes sure the application can use the same memory allocator as librdkafka for allocating pointers that are used by librdkafka.
+rk
can be set to return memory allocated by a specific rk
instance otherwise pass NULL for rk
.
\FFI\CData|null
rd_kafka_t*int|null
size_tint|null
size_t\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_mem_malloc (
+ \FFI\CData|null $rk,
+ int|null $size
+ ): \FFI\CData|object|string|null
+
Allocate memory using the same allocator librdkafka uses.
+This is typically an abstraction for the malloc(3) call and makes sure the application can use the same memory allocator as librdkafka for allocating pointers that are used by librdkafka.
+rk
can be set to return memory allocated by a specific rk
instance otherwise pass NULL for rk
.
\FFI\CData|null
rd_kafka_t*int|null
size_t\FFI\CData|object|string|null
void*See also
+ +public static rd_kafka_mock_broker_push_request_error_rtts (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $ApiKey,
+ int|null $cnt,
+ mixed $args
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
int16_tint|null
size_tmixed
int
rd_kafka_resp_err_tpublic static rd_kafka_conf_enable_sasl_queue (
+ \FFI\CData|null $conf,
+ int|null $enable
+ ): void
+
Enable/disable creation of a queue specific to SASL events and callbacks.
+For SASL mechanisms that trigger callbacks (currently OAUTHBEARER) this configuration API allows an application to get a dedicated queue for the SASL events/callbacks. After enabling the queue with this API the application can retrieve the queue by calling rd_kafka_queue_get_sasl() on the client instance. This queue may then be served directly by the application (with rd_kafka_queue_poll(), et.al) or forwarded to another queue, such as the background queue.
+A convenience function is available to automatically forward the SASL queue to librdkafka's background thread, see rd_kafka_sasl_background_callbacks_enable().
+By default (enable
= 0) the main queue (as served by rd_kafka_poll(), et.al.) is used for SASL callbacks.
\FFI\CData|null
rd_kafka_conf_t*int|null
intSee also
+ +public static rd_kafka_queue_get_sasl (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Use rd_kafka_queue_destroy() to loose the reference.
+\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_queue_t* - a reference to the SASL callback queue, if a SASL mechanism with callbacks is configured (currently only OAUTHBEARER), else returns NULL.See also
+ +public static rd_kafka_sasl_background_callbacks_enable (
+ \FFI\CData|null $rk
+ ): \FFI\CData|null
+
Enable SASL OAUTHBEARER refresh callbacks on the librdkafka background thread.
+This serves as an alternative for applications that do not call rd_kafka_poll() (et.al.) at regular intervals (or not at all), as a means of automatically trigger the refresh callbacks, which are needed to initiate connections to the brokers in the case a custom OAUTHBEARER refresh callback is configured.
+ +\FFI\CData|null
rd_kafka_t* - )\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on error.See also
+ +public static rd_kafka_consumer_close_queue (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $rkqu
+ ): \FFI\CData|null
+
Asynchronously close the consumer.
+Performs the same actions as rd_kafka_consumer_close() but in a background thread.
+Rebalance events/callbacks (etc) will be forwarded to the application-provided rkqu
. The application must poll/serve this queue until rd_kafka_consumer_closed() returns true.
rkqu
.\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_queue_t*\FFI\CData|null
rd_kafka_error_t* - an error object if the consumer close failed, else NULL.See also
+ +public static rd_kafka_consumer_closed (
+ \FFI\CData|null $rk
+ ): int|null
+
Should be used in conjunction with rd_kafka_consumer_close_queue() to know when the consumer has been closed.
+\FFI\CData|null
rd_kafka_t* - )int|null
int - 1 if the consumer is closed, else 0.See also
+ +public static rd_kafka_event_CreateAcls_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_CREATEACLS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_CreateAcls_result_t* - the result of a CreateAcls request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeAcls_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_DESCRIBEACLS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeAcls_result_t* - the result of a DescribeAcls request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DeleteAcls_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Event types: RD_KAFKA_EVENT_DELETEACLS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DeleteAcls_result_t* - the result of a DeleteAcls request, or NULL if event is of different type.See also
+ +public static rd_kafka_ResourcePatternType_name (
+ int $resource_pattern_type
+ ): string|null
+
int
rd_kafka_ResourcePatternType_t - )string|null
const char* - a string representation of the resource_pattern_type
See also
+ +public static rd_kafka_acl_result_error (
+ \FFI\CData|null $aclres
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_acl_result_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error object for the given acl result, or NULL on success.See also
+ +public static rd_kafka_AclOperation_name (
+ int $acl_operation
+ ): string|null
+
int
rd_kafka_AclOperation_t - )string|null
const char* - a string representation of the acl_operation
See also
+ +public static rd_kafka_AclPermissionType_name (
+ int $acl_permission_type
+ ): string|null
+
int
rd_kafka_AclPermissionType_t - )string|null
const char* - a string representation of the acl_permission_type
See also
+ +public static rd_kafka_AclBinding_new (
+ int $restype,
+ string|null $name,
+ int $resource_pattern_type,
+ string|null $principal,
+ string|null $host,
+ int $operation,
+ int $permission_type,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new AclBinding object. This object is later passed to rd_kafka_CreateAcls().
+ +int
rd_kafka_ResourceType_t - The ResourceType.string|null
const char* - The resource name.int
rd_kafka_ResourcePatternType_t - The pattern type.string|null
const char* - A principal, following the kafka specification.string|null
const char* - An hostname or ip.int
rd_kafka_AclOperation_t - A Kafka operation.int
rd_kafka_AclPermissionType_t - A Kafka permission type.\FFI\CData|null
char* - An error string for returning errors or NULL to not use it.int|null
size_t - The errstr
size or 0 to not use it.\FFI\CData|null
rd_kafka_AclBinding_t* - a new allocated AclBinding object, or NULL if the input parameters are invalid. Use rd_kafka_AclBinding_destroy() to free object when done.See also
+ +public static rd_kafka_AclBindingFilter_new (
+ int $restype,
+ string|null $name,
+ int $resource_pattern_type,
+ string|null $principal,
+ string|null $host,
+ int $operation,
+ int $permission_type,
+ \FFI\CData|null $errstr,
+ int|null $errstr_size
+ ): \FFI\CData|null
+
Create a new AclBindingFilter object. This object is later passed to rd_kafka_DescribeAcls() or rd_kafka_DeletesAcls() in order to filter the acls to retrieve or to delete. Use the same rd_kafka_AclBinding functions to query or destroy it.
+ +int
rd_kafka_ResourceType_t - The ResourceType or RD_KAFKA_RESOURCE_ANY
if not filtering by this field.string|null
const char* - The resource name or NULL if not filtering by this field.int
rd_kafka_ResourcePatternType_t - The pattern type or RD_KAFKA_RESOURCE_PATTERN_ANY
if not filtering by this field.string|null
const char* - A principal or NULL if not filtering by this field.string|null
const char* - An hostname or ip or NULL if not filtering by this field.int
rd_kafka_AclOperation_t - A Kafka operation or RD_KAFKA_ACL_OPERATION_ANY
if not filtering by this field.int
rd_kafka_AclPermissionType_t - A Kafka permission type or RD_KAFKA_ACL_PERMISSION_TYPE_ANY
if not filtering by this field.\FFI\CData|null
char* - An error string for returning errors or NULL to not use it.int|null
size_t - The errstr
size or 0 to not use it.\FFI\CData|null
rd_kafka_AclBindingFilter_t* - a new allocated AclBindingFilter object, or NULL if the input parameters are invalid. Use rd_kafka_AclBinding_destroy() to free object when done.See also
+ +public static rd_kafka_AclBinding_restype (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_ResourceType_t - the resource type for the given acl binding.See also
+ +public static rd_kafka_AclBinding_name (
+ \FFI\CData|null $acl
+ ): string|null
+
acl
. \FFI\CData|null
const rd_kafka_AclBinding_t* - )string|null
const char* - the resource name for the given acl binding.See also
+ +public static rd_kafka_AclBinding_principal (
+ \FFI\CData|null $acl
+ ): string|null
+
acl
. \FFI\CData|null
const rd_kafka_AclBinding_t* - )string|null
const char* - the principal for the given acl binding.See also
+ +public static rd_kafka_AclBinding_host (
+ \FFI\CData|null $acl
+ ): string|null
+
acl
. \FFI\CData|null
const rd_kafka_AclBinding_t* - )string|null
const char* - the host for the given acl binding.See also
+ +public static rd_kafka_AclBinding_operation (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_AclOperation_t - the acl operation for the given acl binding.See also
+ +public static rd_kafka_AclBinding_permission_type (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_AclPermissionType_t - the permission type for the given acl binding.See also
+ +public static rd_kafka_AclBinding_resource_pattern_type (
+ \FFI\CData|null $acl
+ ): int
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )int
rd_kafka_ResourcePatternType_t - the resource pattern type for the given acl binding.See also
+ +public static rd_kafka_AclBinding_error (
+ \FFI\CData|null $acl
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_AclBinding_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error object for the given acl binding, or NULL on success.See also
+ +public static rd_kafka_AclBinding_destroy (
+ \FFI\CData|null $acl_binding
+ ): void
+
\FFI\CData|null
rd_kafka_AclBinding_t*public static rd_kafka_AclBinding_destroy_array (
+ \FFI\CData|null $acl_bindings,
+ int|null $acl_bindings_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_AclBinding_t**int|null
size_tpublic static rd_kafka_CreateAcls_result_acls (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of acl results from a CreateAcls result.
+The returned acl
result life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_CreateAcls_result_t* - CreateAcls result to get acl results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_acl_result_t**See also
+ +public static rd_kafka_CreateAcls (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $new_acls,
+ int|null $new_acls_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Create acls as specified by the new_acls
array of size new_topic_cnt
elements.
Supported admin options:
+RD_KAFKA_EVENT_CREATEACLS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AclBinding_t** - Array of new acls to create.int|null
size_t - Number of elements in new_acls
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DescribeAcls_result_acls (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a DescribeAcls result.
+DescribeAcls - describe access control lists.
+The returned resources
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DescribeAcls_result_t* - DescribeAcls result to get acls from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_AclBinding_t**See also
+ +public static rd_kafka_DescribeAcls (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $acl_filter,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Describe acls matching the filter provided in acl_filter
.
Supported admin options:
+RD_KAFKA_EVENT_DESCRIBEACLS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AclBindingFilter_t* - Filter for the returned acls.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DeleteAcls_result_responses (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of DeleteAcls result responses from a DeleteAcls result.
+The returned responses
life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DeleteAcls_result_t* - DeleteAcls result to get responses from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_DeleteAcls_result_response_t**See also
+ +public static rd_kafka_DeleteAcls_result_response_error (
+ \FFI\CData|null $result_response
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DeleteAcls_result_response_t* - )\FFI\CData|null
const rd_kafka_error_t* - the error object for the given DeleteAcls result response, or NULL on success.See also
+ +public static rd_kafka_DeleteAcls_result_response_matching_acls (
+ \FFI\CData|null $result_response,
+ \FFI\CData|null $matching_acls_cntp
+ ): \FFI\CData|null
+
result_response
. \FFI\CData|null
const rd_kafka_DeleteAcls_result_response_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclBinding_t** - the matching acls array for the given DeleteAcls result response.See also
+ +public static rd_kafka_DeleteAcls (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $del_acls,
+ int|null $del_acls_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Delete acls matching the filteres provided in del_acls
array of size del_acls_cnt
.
Supported admin options:
+RD_KAFKA_EVENT_DELETEACLS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AclBindingFilter_t** - Filters for the acls to delete.int|null
size_t - Number of elements in del_acls
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_conf_set_resolve_cb (
+ \FFI\CData|null $conf,
+ \FFI\CData|\Closure $resolve_cb
+ ): void
+
Set address resolution callback.
+The callback is responsible for resolving the hostname node
and the service service
into a list of socket addresses as getaddrinfo(3)
would. The hints
and res
parameters function as they do for getaddrinfo(3)
. The callback's opaque
argument is the opaque set with rd_kafka_conf_set_opaque().
If the callback is invoked with a NULL node
, service
, and hints
, the callback should instead free the addrinfo struct specified in res
. In this case the callback must succeed; the return value will not be checked by the caller.
The callback's return value is interpreted as the return value of getaddrinfo(3)
.
\FFI\CData|null
rd_kafka_conf_t*\FFI\CData|\Closure
int()(const char, const char*, const struct addrinfo*, struct addrinfo**, void*)See also
+ +public static rd_kafka_sasl_set_credentials (
+ \FFI\CData|null $rk,
+ string|null $username,
+ string|null $password
+ ): \FFI\CData|null
+
Sets SASL credentials used for SASL PLAIN and SCRAM mechanisms by this Kafka client.
+This function sets or resets the SASL username and password credentials used by this Kafka client. The new credentials will be used the next time this client needs to authenticate to a broker. This function will not disconnect existing connections that might have been made using the old credentials.
+\FFI\CData|null
rd_kafka_t*string|null
const char*string|null
const char*\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on error.See also
+ +public static rd_kafka_Node_id (
+ \FFI\CData|null $node
+ ): int|null
+
Get the id of node
.
\FFI\CData|null
const rd_kafka_Node_t* - ) - The Node instance.int|null
int - The node id.See also
+ +public static rd_kafka_Node_host (
+ \FFI\CData|null $node
+ ): string|null
+
Get the host of node
.
node
object. \FFI\CData|null
const rd_kafka_Node_t* - ) - The Node instance.string|null
const char* - The node host.See also
+ +public static rd_kafka_Node_port (
+ \FFI\CData|null $node
+ ): int|null
+
Get the port of node
.
\FFI\CData|null
const rd_kafka_Node_t* - ) - The Node instance.int|null
uint16_t - The node port.See also
+ +public static rd_kafka_consumer_group_state_name (
+ int $state
+ ): string|null
+
Returns a name for a state code.
+ +int
rd_kafka_consumer_group_state_t - ) - The state value.string|null
const char* - The group state name corresponding to the provided group state value.See also
+ +public static rd_kafka_consumer_group_state_code (
+ string|null $name
+ ): int
+
Returns a code for a state name.
+ +string|null
const char* - ) - The state name.int
rd_kafka_consumer_group_state_t - The group state value corresponding to the provided group state name.See also
+ +public static rd_kafka_event_ListConsumerGroups_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get ListConsumerGroups result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_ListConsumerGroups_result_t* - the result of a ListConsumerGroups request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeConsumerGroups_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DescribeConsumerGroups result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeConsumerGroups_result_t* - the result of a DescribeConsumerGroups request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_AlterConsumerGroupOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get AlterConsumerGroupOffsets result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_AlterConsumerGroupOffsets_result_t* - the result of a AlterConsumerGroupOffsets request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_ListConsumerGroupOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get ListConsumerGroupOffsets result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_ListConsumerGroupOffsets_result_t* - the result of a ListConsumerGroupOffsets request, or NULL if event is of different type.See also
+ +public static rd_kafka_interceptor_f_on_broker_state_change_t (
+ \FFI\CData|null $rk,
+ int|null $broker_id,
+ string|null $secproto,
+ string|null $name,
+ int|null $port,
+ string|null $state,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
on_broker_state_change() is called just after a broker has been created or its state has been changed.
+ +\FFI\CData|null
rd_kafka_t* - The client instance.int|null
int32_t - The broker id (-1 is used for bootstrap brokers).string|null
const char* - The security protocol.string|null
const char* - The original name of the broker.int|null
int - The port of the broker.string|null
const char* - Broker state name.\FFI\CData|object|string|null
void* - The interceptor’s opaque pointer specified in ..add..().int
rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored.See also
+ +public static rd_kafka_interceptor_add_on_broker_state_change (
+ \FFI\CData|null $rk,
+ string|null $ic_name,
+ \FFI\CData|\Closure $on_broker_state_change,
+ \FFI\CData|object|string|null $ic_opaque
+ ): int
+
Append an on_broker_state_change() interceptor.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.string|null
const char* - Interceptor name, used in logging.\FFI\CData|\Closure
rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_broker_state_change_t*)(rd_kafka_t*, int32_t, const char*, const char*, int, const char*, void*)\FFI\CData|object|string|null
void* - Opaque value that will be passed to the function.int
rd_kafka_resp_err_t - RD_KAFKA_RESP_ERR_NO_ERROR on success or RD_KAFKA_RESP_ERR__CONFLICT if an existing interceptor with the same ic_name
and function has already been added to conf
.See also
+ +public static rd_kafka_AdminOptions_set_require_stable_offsets (
+ \FFI\CData|null $options,
+ int|null $true_or_false
+ ): \FFI\CData|null
+
Whether broker should return stable offsets (transaction-committed).
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.int|null
int - Defaults to false.\FFI\CData|null
rd_kafka_error_t* - NULL on success, a new error instance that must be released with rd_kafka_error_destroy() in case of error.See also
+ +public static rd_kafka_AdminOptions_set_match_consumer_group_states (
+ \FFI\CData|null $options,
+ \FFI\CData|null $consumer_group_states,
+ int|null $consumer_group_states_cnt
+ ): \FFI\CData|null
+
Set consumer groups states to query for.
+ +\FFI\CData|null
rd_kafka_AdminOptions_t* - Admin options.\FFI\CData|null
const rd_kafka_consumer_group_state_t* - Array of consumer group states.int|null
size_t - Size of the consumer_group_states
array.\FFI\CData|null
rd_kafka_error_t* - NULL on success, a new error instance that must be released with rd_kafka_error_destroy() in case of error.See also
+ +public static rd_kafka_ListConsumerGroups (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
List the consumer groups available in the cluster.
+ +RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_ConsumerGroupListing_group_id (
+ \FFI\CData|null $grplist
+ ): string|null
+
Gets the group id for the grplist
group.
grplist
object. \FFI\CData|null
const rd_kafka_ConsumerGroupListing_t* - ) - The group listing.string|null
const char* - The group id.See also
+ +public static rd_kafka_ConsumerGroupListing_is_simple_consumer_group (
+ \FFI\CData|null $grplist
+ ): int|null
+
Is the grplist
group a simple consumer group.
\FFI\CData|null
const rd_kafka_ConsumerGroupListing_t* - ) - The group listing.int|null
int - 1 if the group is a simple consumer group, else 0.See also
+ +public static rd_kafka_ConsumerGroupListing_state (
+ \FFI\CData|null $grplist
+ ): int
+
Gets state for the grplist
group.
\FFI\CData|null
const rd_kafka_ConsumerGroupListing_t* - ) - The group listing.int
rd_kafka_consumer_group_state_t - A group state.See also
+ +public static rd_kafka_ListConsumerGroups_result_valid (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of valid list groups from a ListConsumerGroups result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_ListConsumerGroups_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConsumerGroupListing_t**See also
+ +public static rd_kafka_ListConsumerGroups_result_errors (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of errors from a ListConsumerGroups call result.
+The returned errors life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_ListConsumerGroups_result_t* - ListConsumerGroups result.\FFI\CData|null
size_t* - Is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_error_t** - Array of errors in result
.See also
+ +public static rd_kafka_DescribeConsumerGroups (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $groups,
+ int|null $groups_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Describe groups from cluster as specified by the groups
array of size groups_cnt
elements.
RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
const char** - Array of groups to describe.int|null
size_t - Number of elements in groups
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_DescribeConsumerGroups_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of group results from a DescribeConsumerGroups result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_DescribeConsumerGroups_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t**See also
+ +public static rd_kafka_ConsumerGroupDescription_group_id (
+ \FFI\CData|null $grpdesc
+ ): string|null
+
Gets the group id for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.string|null
const char* - The group id.See also
+ +public static rd_kafka_ConsumerGroupDescription_error (
+ \FFI\CData|null $grpdesc
+ ): \FFI\CData|null
+
Gets the error for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.\FFI\CData|null
const rd_kafka_error_t* - The group description error.See also
+ +public static rd_kafka_ConsumerGroupDescription_is_simple_consumer_group (
+ \FFI\CData|null $grpdesc
+ ): int|null
+
Is the grpdesc
group a simple consumer group.
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.int|null
int - 1 if the group is a simple consumer group, else 0.See also
+ +public static rd_kafka_ConsumerGroupDescription_partition_assignor (
+ \FFI\CData|null $grpdesc
+ ): string|null
+
Gets the partition assignor for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.string|null
const char* - The partition assignor.See also
+ +public static rd_kafka_ConsumerGroupDescription_state (
+ \FFI\CData|null $grpdesc
+ ): int
+
Gets state for the grpdesc
group.
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.int
rd_kafka_consumer_group_state_t - A group state.See also
+ +public static rd_kafka_ConsumerGroupDescription_coordinator (
+ \FFI\CData|null $grpdesc
+ ): \FFI\CData|null
+
Gets the coordinator for the grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.\FFI\CData|null
const rd_kafka_Node_t* - The group coordinator.See also
+ +public static rd_kafka_ConsumerGroupDescription_member_count (
+ \FFI\CData|null $grpdesc
+ ): int|null
+
Gets the members count of grpdesc
group.
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - ) - The group description.int|null
size_t - The member count.See also
+ +public static rd_kafka_ConsumerGroupDescription_member (
+ \FFI\CData|null $grpdesc,
+ int|null $idx
+ ): \FFI\CData|null
+
Gets a member of grpdesc
group.
grpdesc
object. \FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t* - The group description.int|null
size_t - The member idx.\FFI\CData|null
const rd_kafka_MemberDescription_t* - A member at index idx
, or NULL if idx
is out of range.See also
+ +public static rd_kafka_MemberDescription_client_id (
+ \FFI\CData|null $member
+ ): string|null
+
Gets client id of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The client id.See also
+ +public static rd_kafka_MemberDescription_group_instance_id (
+ \FFI\CData|null $member
+ ): string|null
+
Gets group instance id of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The group instance id, or NULL if not available.See also
+ +public static rd_kafka_MemberDescription_consumer_id (
+ \FFI\CData|null $member
+ ): string|null
+
Gets consumer id of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The consumer id.See also
+ +public static rd_kafka_MemberDescription_host (
+ \FFI\CData|null $member
+ ): string|null
+
Gets host of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.string|null
const char* - The host.See also
+ +public static rd_kafka_MemberDescription_assignment (
+ \FFI\CData|null $member
+ ): \FFI\CData|null
+
Gets assignment of member
.
member
object. \FFI\CData|null
const rd_kafka_MemberDescription_t* - ) - The group member.\FFI\CData|null
const rd_kafka_MemberAssignment_t* - The member assignment.See also
+ +public static rd_kafka_MemberAssignment_partitions (
+ \FFI\CData|null $assignment
+ ): \FFI\CData|null
+
Gets assigned partitions of a member assignment
.
assignment
object. \FFI\CData|null
const rd_kafka_MemberAssignment_t* - ) - The group member assignment.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - The assigned partitions.See also
+ +public static rd_kafka_ListConsumerGroupOffsets_new (
+ string|null $group_id,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Create a new ListConsumerGroupOffsets object. This object is later passed to rd_kafka_ListConsumerGroupOffsets().
+ +string|null
const char* - Consumer group id.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - Partitions to list committed offsets for. Only the topic and partition fields are used.\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t* - a new allocated ListConsumerGroupOffsets object. Use rd_kafka_ListConsumerGroupOffsets_destroy() to free object when done.See also
+ +public static rd_kafka_ListConsumerGroupOffsets_destroy (
+ \FFI\CData|null $list_grpoffsets
+ ): void
+
\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t*public static rd_kafka_ListConsumerGroupOffsets_destroy_array (
+ \FFI\CData|null $list_grpoffsets,
+ int|null $list_grpoffset_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t**int|null
size_tpublic static rd_kafka_ListConsumerGroupOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $list_grpoffsets,
+ int|null $list_grpoffsets_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
List committed offsets for a set of partitions in a consumer group.
+ +RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_ListConsumerGroupOffsets_t** - Array of group committed offsets to list. MUST only be one single element.int|null
size_t - Number of elements in list_grpoffsets
array. MUST always be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_ListConsumerGroupOffsets_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of results from a ListConsumerGroupOffsets result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_ListConsumerGroupOffsets_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_AlterConsumerGroupOffsets_new (
+ string|null $group_id,
+ \FFI\CData|null $partitions
+ ): \FFI\CData|null
+
Create a new AlterConsumerGroupOffsets object. This object is later passed to rd_kafka_AlterConsumerGroupOffsets().
+ +string|null
const char* - Consumer group id.\FFI\CData|null
const rd_kafka_topic_partition_list_t* - Partitions to alter committed offsets for. Only the topic and partition fields are used.\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t* - a new allocated AlterConsumerGroupOffsets object. Use rd_kafka_AlterConsumerGroupOffsets_destroy() to free object when done.See also
+ +public static rd_kafka_AlterConsumerGroupOffsets_destroy (
+ \FFI\CData|null $alter_grpoffsets
+ ): void
+
\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t*public static rd_kafka_AlterConsumerGroupOffsets_destroy_array (
+ \FFI\CData|null $alter_grpoffsets,
+ int|null $alter_grpoffset_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t**int|null
size_tpublic static rd_kafka_AlterConsumerGroupOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $alter_grpoffsets,
+ int|null $alter_grpoffsets_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Alter committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.
+ +RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT
\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_AlterConsumerGroupOffsets_t** - Array of group committed offsets to alter. MUST only be one single element.int|null
size_t - Number of elements in alter_grpoffsets
array. MUST always be 1.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_AlterConsumerGroupOffsets_result_groups (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of results from a AlterConsumerGroupOffsets result.
+The returned groups life-time is the same as the result
object.
result
object. \FFI\CData|null
const rd_kafka_AlterConsumerGroupOffsets_result_t* - Result to get group results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_group_result_t**See also
+ +public static rd_kafka_mock_broker_error_stack_cnt (
+ \FFI\CData|null $mcluster,
+ int|null $broker_id,
+ int|null $ApiKey,
+ \FFI\CData|null $cntp
+ ): int
+
\FFI\CData|null
rd_kafka_mock_cluster_t*int|null
int32_tint|null
int16_t\FFI\CData|null
size_t*int
rd_kafka_resp_err_tpublic static rd_kafka_topic_partition_set_leader_epoch (
+ \FFI\CData|null $rktpar,
+ int|null $leader_epoch
+ ): void
+
Sets the offset leader epoch (use -1 to clear).
+ +\FFI\CData|null
rd_kafka_topic_partition_t* - Partition object.int|null
int32_t - Offset leader epoch, use -1 to reset.See also
+ +public static rd_kafka_topic_partition_get_leader_epoch (
+ \FFI\CData|null $rktpar
+ ): int|null
+
\FFI\CData|null
const rd_kafka_topic_partition_t* - ) - Partition object.int|null
int32_t - the offset leader epoch, if relevant and known, else -1.See also
+ +public static rd_kafka_message_leader_epoch (
+ \FFI\CData|null $rkmessage
+ ): int|null
+
\FFI\CData|null
const rd_kafka_message_t* - )int|null
int32_t - the message’s partition leader epoch at the time the message was fetched and if known, else -1.See also
+ +public static rd_kafka_offset_store_message (
+ \FFI\CData|null $rkmessage
+ ): \FFI\CData|null
+
Store offset +1 for the consumed message.
+The message offset + 1 will be committed to broker according to
or manual offset-less commit()auto.commit.interval.ms
enable.auto.offset.store
must be set to "false" when using this API.\FFI\CData|null
rd_kafka_message_t* - )\FFI\CData|null
rd_kafka_error_t* - NULL on success or an error object on failure.See also
+ +public static rd_kafka_event_IncrementalAlterConfigs_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get IncrementalAlterConfigs result.
+ +Event types: RD_KAFKA_EVENT_INCREMENTALALTERCONFIGS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_IncrementalAlterConfigs_result_t* - the result of a IncrementalAlterConfigs request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_DescribeUserScramCredentials_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get DescribeUserScramCredentials result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_DESCRIBEUSERSCRAMCREDENTIALS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_DescribeUserScramCredentials_result_t* - the result of a DescribeUserScramCredentials request, or NULL if event is of different type.See also
+ +public static rd_kafka_event_AlterUserScramCredentials_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
Get AlterUserScramCredentials result.
+ +rkev
object.Event types: RD_KAFKA_EVENT_ALTERUSERSCRAMCREDENTIALS_RESULT
+ +\FFI\CData|null
rd_kafka_event_t* - )\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_t* - the result of a AlterUserScramCredentials request, or NULL if event is of different type.See also
+ +public static rd_kafka_ConfigResource_add_incremental_config (
+ \FFI\CData|null $config,
+ string|null $name,
+ int $op_type,
+ string|null $value
+ ): \FFI\CData|null
+
Add the value of the configuration entry for a subsequent incremental alter config operation. APPEND and SUBTRACT are possible for list-type configuration entries only.
+ +\FFI\CData|null
rd_kafka_ConfigResource_t* - ConfigResource to add config property to.string|null
const char* - Configuration name, depends on resource type.int
rd_kafka_AlterConfigOpType_t - Operation type, one of rd_kafka_AlterConfigOpType_t.string|null
const char* - Configuration value, depends on resource type and name
. Set to NULL
, only with with op_type set to DELETE, to revert configuration value to default.\FFI\CData|null
rd_kafka_error_t* - NULL on success, or an rd_kafka_error_t * with the corresponding error code and string. Error ownership belongs to the caller. Possible error codes:See also
+ +public static rd_kafka_IncrementalAlterConfigs (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $configs,
+ int|null $config_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Incrementally update the configuration for the specified resources. Updates are not transactional so they may succeed for some resources while fail for others. The configs for a particular resource are updated atomically, executing the corresponding incremental operations on the provided configurations.
+RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource. Broker option will be ignored in this case.\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_ConfigResource_t** - Array of config entries to alter.int|null
size_t - Number of elements in configs
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_IncrementalAlterConfigs_result_resources (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of resource results from a IncrementalAlterConfigs result.
+Use rd_kafka_ConfigResource_error()
and rd_kafka_ConfigResource_error_string()
to extract per-resource error results on the returned array elements.
The returned object life-times are the same as the result
object.
\FFI\CData|null
const rd_kafka_IncrementalAlterConfigs_result_t* - Result object to get resource results from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_ConfigResource_t** - an array of ConfigResource elements, or NULL if not available.See also
+ +public static rd_kafka_ScramCredentialInfo_mechanism (
+ \FFI\CData|null $scram_credential_info
+ ): int
+
\FFI\CData|null
const rd_kafka_ScramCredentialInfo_t*int
rd_kafka_ScramMechanism_tpublic static rd_kafka_ScramCredentialInfo_iterations (
+ \FFI\CData|null $scram_credential_info
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ScramCredentialInfo_t*int|null
int32_tpublic static rd_kafka_UserScramCredentialsDescription_user (
+ \FFI\CData|null $description
+ ): string|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*string|null
const char*public static rd_kafka_UserScramCredentialsDescription_error (
+ \FFI\CData|null $description
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*\FFI\CData|null
const rd_kafka_error_t*public static rd_kafka_UserScramCredentialsDescription_scramcredentialinfo_count (
+ \FFI\CData|null $description
+ ): int|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*int|null
size_tpublic static rd_kafka_UserScramCredentialsDescription_scramcredentialinfo (
+ \FFI\CData|null $description,
+ int|null $idx
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t*int|null
size_t\FFI\CData|null
const rd_kafka_ScramCredentialInfo_t*public static rd_kafka_DescribeUserScramCredentials_result_descriptions (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of descriptions from a DescribeUserScramCredentials result.
+The returned value life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_DescribeUserScramCredentials_result_t* - Result to get descriptions from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_UserScramCredentialsDescription_t**See also
+ +public static rd_kafka_DescribeUserScramCredentials (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $users,
+ int|null $user_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Describe SASL/SCRAM credentials. This operation is supported by brokers with version 2.7.0 or higher.
+ +\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
const char** - The users for which credentials are to be described. All users’ credentials are described if NULL.int|null
size_t - Number of elements in users
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_UserScramCredentialUpsertion_new (
+ string|null $username,
+ int $mechanism,
+ int|null $iterations,
+ \FFI\CData|null $password,
+ int|null $password_size,
+ \FFI\CData|null $salt,
+ int|null $salt_size
+ ): \FFI\CData|null
+
Allocates a new UserScramCredentialUpsertion given its fields. If salt isn't given a 64 B salt is generated using OpenSSL RAND_priv_bytes, if available.
+ +string|null
const char* - The username (not empty).int
rd_kafka_ScramMechanism_t - SASL/SCRAM mechanism.int|null
int32_t - SASL/SCRAM iterations.\FFI\CData|null
const unsigned char* - Password bytes (not empty).int|null
size_t - Size of password
(greater than 0).\FFI\CData|null
const unsigned char* - Salt bytes (optional).int|null
size_t - Size of salt
(optional).\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t* - A newly created instance of rd_kafka_UserScramCredentialAlteration_t. Ownership belongs to the caller, use rd_kafka_UserScramCredentialAlteration_destroy to destroy.See also
+ +public static rd_kafka_UserScramCredentialDeletion_new (
+ string|null $username,
+ int $mechanism
+ ): \FFI\CData|null
+
Allocates a new UserScramCredentialDeletion given its fields.
+ +string|null
const char* - The username (not empty).int
rd_kafka_ScramMechanism_t - SASL/SCRAM mechanism.\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t* - A newly created instance of rd_kafka_UserScramCredentialAlteration_t. Ownership belongs to the caller, use rd_kafka_UserScramCredentialAlteration_destroy to destroy.See also
+ +public static rd_kafka_UserScramCredentialAlteration_destroy (
+ \FFI\CData|null $alteration
+ ): void
+
\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t*public static rd_kafka_UserScramCredentialAlteration_destroy_array (
+ \FFI\CData|null $alterations,
+ int|null $alteration_cnt
+ ): void
+
\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t**int|null
size_tpublic static rd_kafka_AlterUserScramCredentials_result_response_user (
+ \FFI\CData|null $response
+ ): string|null
+
\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_response_t*string|null
const char*public static rd_kafka_AlterUserScramCredentials_result_response_error (
+ \FFI\CData|null $response
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_response_t*\FFI\CData|null
const rd_kafka_error_t*public static rd_kafka_AlterUserScramCredentials_result_responses (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
Get an array of responses from a AlterUserScramCredentials result.
+The returned value life-time is the same as the result
object.
\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_t* - Result to get responses from.\FFI\CData|null
size_t* - is updated to the number of elements in the array.\FFI\CData|null
const rd_kafka_AlterUserScramCredentials_result_response_t**See also
+ +public static rd_kafka_AlterUserScramCredentials (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $alterations,
+ int|null $alteration_cnt,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
Alter SASL/SCRAM credentials. This operation is supported by brokers with version 2.7.0 or higher.
+\FFI\CData|null
rd_kafka_t* - Client instance.\FFI\CData|null
rd_kafka_UserScramCredentialAlteration_t** - The alterations to be applied.int|null
size_t - Number of elements in alterations
array.\FFI\CData|null
const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.\FFI\CData|null
rd_kafka_queue_t* - Queue to emit result on.See also
+ +public static rd_kafka_Uuid_base64str (
+ \FFI\CData|null $uuid
+ ): string|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*string|null
const char*public static rd_kafka_Uuid_least_significant_bits (
+ \FFI\CData|null $uuid
+ ): int|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*int|null
int64_tpublic static rd_kafka_Uuid_most_significant_bits (
+ \FFI\CData|null $uuid
+ ): int|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*int|null
int64_tpublic static rd_kafka_Uuid_new (
+ int|null $most_significant_bits,
+ int|null $least_significant_bits
+ ): \FFI\CData|null
+
int|null
int64_tint|null
int64_t\FFI\CData|null
rd_kafka_Uuid_t*public static rd_kafka_Uuid_copy (
+ \FFI\CData|null $uuid
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_Uuid_t*\FFI\CData|null
rd_kafka_Uuid_t*public static rd_kafka_Uuid_destroy (
+ \FFI\CData|null $uuid
+ ): void
+
\FFI\CData|null
rd_kafka_Uuid_t*public static rd_kafka_Node_rack (
+ \FFI\CData|null $node
+ ): string|null
+
\FFI\CData|null
const rd_kafka_Node_t*string|null
const char*public static rd_kafka_event_DescribeTopics_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_DescribeTopics_result_t*public static rd_kafka_event_DescribeCluster_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*public static rd_kafka_event_ListOffsets_result (
+ \FFI\CData|null $rkev
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_event_t*\FFI\CData|null
const rd_kafka_ListOffsets_result_t*public static rd_kafka_AdminOptions_set_include_authorized_operations (
+ \FFI\CData|null $options,
+ int|null $true_or_false
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_AdminOptions_t*int|null
int\FFI\CData|null
rd_kafka_error_t*public static rd_kafka_AdminOptions_set_isolation_level (
+ \FFI\CData|null $options,
+ int $value
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_AdminOptions_t*int
rd_kafka_IsolationLevel_t\FFI\CData|null
rd_kafka_error_t*public static rd_kafka_TopicCollection_of_topic_names (
+ \FFI\CData|null $topics,
+ int|null $topics_cnt
+ ): \FFI\CData|null
+
\FFI\CData|null
const char**int|null
size_t\FFI\CData|null
rd_kafka_TopicCollection_t*public static rd_kafka_TopicCollection_destroy (
+ \FFI\CData|null $topics
+ ): void
+
\FFI\CData|null
rd_kafka_TopicCollection_t*public static rd_kafka_DescribeTopics (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topics,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_TopicCollection_t*\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*public static rd_kafka_DescribeTopics_result_topics (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeTopics_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_TopicDescription_t**public static rd_kafka_TopicDescription_partitions (
+ \FFI\CData|null $topicdesc,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t**public static rd_kafka_TopicPartitionInfo_partition (
+ \FFI\CData|null $partition
+ ): int|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*int|null
const intpublic static rd_kafka_TopicPartitionInfo_leader (
+ \FFI\CData|null $partition
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*\FFI\CData|null
const rd_kafka_Node_t*public static rd_kafka_TopicPartitionInfo_isr (
+ \FFI\CData|null $partition,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_Node_t**public static rd_kafka_TopicPartitionInfo_replicas (
+ \FFI\CData|null $partition,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicPartitionInfo_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_Node_t**public static rd_kafka_TopicDescription_authorized_operations (
+ \FFI\CData|null $topicdesc,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclOperation_t*public static rd_kafka_TopicDescription_name (
+ \FFI\CData|null $topicdesc
+ ): string|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*string|null
const char*public static rd_kafka_TopicDescription_topic_id (
+ \FFI\CData|null $topicdesc
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
const rd_kafka_Uuid_t*public static rd_kafka_TopicDescription_is_internal (
+ \FFI\CData|null $topicdesc
+ ): int|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*int|null
intpublic static rd_kafka_TopicDescription_error (
+ \FFI\CData|null $topicdesc
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_TopicDescription_t*\FFI\CData|null
const rd_kafka_error_t*public static rd_kafka_DescribeCluster (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*public static rd_kafka_DescribeCluster_result_nodes (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_Node_t**public static rd_kafka_DescribeCluster_result_authorized_operations (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclOperation_t*public static rd_kafka_DescribeCluster_result_controller (
+ \FFI\CData|null $result
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*\FFI\CData|null
const rd_kafka_Node_t*public static rd_kafka_DescribeCluster_result_cluster_id (
+ \FFI\CData|null $result
+ ): string|null
+
\FFI\CData|null
const rd_kafka_DescribeCluster_result_t*string|null
const char*public static rd_kafka_ConsumerGroupDescription_authorized_operations (
+ \FFI\CData|null $grpdesc,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_ConsumerGroupDescription_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_AclOperation_t*public static rd_kafka_ListOffsetsResultInfo_topic_partition (
+ \FFI\CData|null $result_info
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_ListOffsetsResultInfo_t*\FFI\CData|null
const rd_kafka_topic_partition_t*public static rd_kafka_ListOffsetsResultInfo_timestamp (
+ \FFI\CData|null $result_info
+ ): int|null
+
\FFI\CData|null
const rd_kafka_ListOffsetsResultInfo_t*int|null
int64_tpublic static rd_kafka_ListOffsets_result_infos (
+ \FFI\CData|null $result,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
const rd_kafka_ListOffsets_result_t*\FFI\CData|null
size_t*\FFI\CData|null
const rd_kafka_ListOffsetsResultInfo_t**public static rd_kafka_ListOffsets (
+ \FFI\CData|null $rk,
+ \FFI\CData|null $topic_partitions,
+ \FFI\CData|null $options,
+ \FFI\CData|null $rkqu
+ ): void
+
\FFI\CData|null
rd_kafka_t*\FFI\CData|null
rd_kafka_topic_partition_list_t*\FFI\CData|null
const rd_kafka_AdminOptions_t*\FFI\CData|null
rd_kafka_queue_t*public static rd_kafka_mock_start_request_tracking (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_stop_request_tracking (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*public static rd_kafka_mock_request_destroy (
+ \FFI\CData|null $mreq
+ ): void
+
\FFI\CData|null
rd_kafka_mock_request_t*public static rd_kafka_mock_request_id (
+ \FFI\CData|null $mreq
+ ): int|null
+
\FFI\CData|null
rd_kafka_mock_request_t*int|null
int32_tpublic static rd_kafka_mock_request_api_key (
+ \FFI\CData|null $mreq
+ ): int|null
+
\FFI\CData|null
rd_kafka_mock_request_t*int|null
int16_tpublic static rd_kafka_mock_request_timestamp (
+ \FFI\CData|null $mreq
+ ): int|null
+
\FFI\CData|null
rd_kafka_mock_request_t*int|null
int64_tpublic static rd_kafka_mock_get_requests (
+ \FFI\CData|null $mcluster,
+ \FFI\CData|null $cntp
+ ): \FFI\CData|null
+
\FFI\CData|null
rd_kafka_mock_cluster_t*\FFI\CData|null
size_t*\FFI\CData|null
rd_kafka_mock_request_t**public static rd_kafka_mock_clear_requests (
+ \FFI\CData|null $mcluster
+ ): void
+
\FFI\CData|null
rd_kafka_mock_cluster_t*Class \RdKafka\FFI\NativePartitionerCallbackProxy
+public __construct (
+ string $partitionerMethod
+ ):
+
string
public __invoke (
+ ?\FFI\CData $topic,
+ ?\FFI\CData $keydata,
+ int $keylen,
+ int $partition_cnt,
+ ?\FFI\CData $topic_opaque = null,
+ ?\FFI\CData $msg_opaque = null
+ ): int
+
?\FFI\CData
?\FFI\CData
int
int
?\FFI\CData
?\FFI\CData
int
public static create (
+ string $partitionerMethod
+ ): \Closure
+
string
\Closure
Class \RdKafka\FFI\OffsetCommitCallbackProxy
+public __invoke (
+ \FFI\CData $consumer,
+ int $err,
+ \FFI\CData $nativeTopicPartitionList,
+ ?\FFI\CData $opaque = null
+ ): void
+
\FFI\CData
int
\FFI\CData
?\FFI\CData
Class \RdKafka\FFI\OpaqueMap
+public static get (
+ ?\FFI\CData $cOpaque
+ ): mixed|null
+
?\FFI\CData
mixed|null
public static pull (
+ ?\FFI\CData $cOpaque
+ ): mixed|null
+
?\FFI\CData
mixed|null
public static push (
+ mixed|null $opaque
+ ): ?\FFI\CData
+
mixed|null
?\FFI\CData
Class \RdKafka\FFI\PartitionerCallbackProxy
+public __invoke (
+ ?\FFI\CData $topic,
+ ?\FFI\CData $keydata,
+ int $keylen,
+ int $partition_cnt,
+ ?\FFI\CData $topic_opaque = null,
+ ?\FFI\CData $msg_opaque = null
+ ): int
+
?\FFI\CData
?\FFI\CData
int
int
?\FFI\CData
?\FFI\CData
int
Class \RdKafka\FFI\RebalanceCallbackProxy
+public __invoke (
+ \FFI\CData $consumer,
+ int $err,
+ \FFI\CData $nativeTopicPartitionList,
+ ?\FFI\CData $opaque = null
+ ): void
+
\FFI\CData
int
\FFI\CData
?\FFI\CData
Class \RdKafka\FFI\StatsCallbackProxy
+public __invoke (
+ \FFI\CData $consumerOrProducer,
+ \FFI\CData $json,
+ int $json_len,
+ ?\FFI\CData $opaque = null
+ ): int
+
\FFI\CData
\FFI\CData
int
?\FFI\CData
int
Class \RdKafka\KafkaConsumer
+public __construct (
+ \RdKafka\Conf $conf
+ ):
+
\RdKafka\Conf
public __destruct ( ):
+
public assign (
+ \RdKafka\TopicPartition[] $topic_partitions = null
+ ): void
+
\RdKafka\TopicPartition[]
public close ( ): void
+
public commit (
+ \RdKafka\Message|\RdKafka\TopicPartition[]|null $message_or_offsets = null
+ ): void
+
\RdKafka\Message|\RdKafka\TopicPartition[]|null
public commitAsync (
+ \RdKafka\Message|\RdKafka\TopicPartition[]|null $message_or_offsets = null
+ ): void
+
\RdKafka\Message|\RdKafka\TopicPartition[]|null
public consume (
+ int $timeout_ms
+ ): \RdKafka\Message
+
int
\RdKafka\Message
public getAssignment ( ): \RdKafka\TopicPartition[]
+
\RdKafka\TopicPartition[]
public getCommittedOffsets (
+ \RdKafka\TopicPartition[] $topics,
+ int $timeout_ms
+ ): \RdKafka\TopicPartition[]
+
\RdKafka\TopicPartition[]
int
\RdKafka\TopicPartition[]
public getSubscription ( ): array
+
array
public newTopic (
+ string $topic_name,
+ ?\RdKafka\TopicConf $topic_conf = null
+ ): \RdKafka\KafkaConsumerTopic
+
string
?\RdKafka\TopicConf
\RdKafka\KafkaConsumerTopic
public offsetsForTimes (
+ \RdKafka\TopicPartition[] $topicPartitions,
+ int $timeout_ms
+ ): \RdKafka\TopicPartition[]
+
\RdKafka\TopicPartition[]
int
\RdKafka\TopicPartition[]
public subscribe (
+ array $topics
+ ): void
+
array
public unsubscribe ( ): void
+
Class \RdKafka\KafkaConsumerTopic
+public __construct (
+ \RdKafka\KafkaConsumer $consumer,
+ string $name,
+ ?\RdKafka\TopicConf $conf = null
+ ):
+
\RdKafka\KafkaConsumer
string
?\RdKafka\TopicConf
public offsetStore (
+ int $partition,
+ int $offset
+ ): void
+
int
int
Class \RdKafka\KafkaErrorException
+public __construct (
+ string $message,
+ int $code,
+ string $error_string,
+ bool $isFatal = false,
+ bool $isRetriable = false,
+ bool $transactionRequiresAbort = false
+ ):
+
string
int
string
bool
bool
bool
public static fromCData (
+ \FFI\CData $error
+ ): mixed
+
\FFI\CData
mixed
public getErrorString ( ): string
+
string
public isFatal ( ): bool
+
bool
public isRetriable ( ): bool
+
bool
public transactionRequiresAbort ( ): bool
+
bool
Class \RdKafka\Message
+ public int brokerId
+
public int err
+
public array headers
+
public ?string key
+
public int latency
+
public ?int len
+
public int offset
+
public mixed|null opaque
+
public int partition
+
public ?string payload
+
public int status
+
public int timestamp
+
public int timestampType
+
public ?string topic_name
+
public __construct (
+ \FFI\CData $nativeMessage
+ ):
+
\FFI\CData
public errstr ( ): string
+
string
Class \RdKafka\Metadata\Broker
+public __construct (
+ int $id,
+ string $host,
+ int $port
+ ):
+
int
string
int
public getHost ( ): string
+
string
public getId ( ): int
+
int
public getPort ( ): int
+
int
Class \RdKafka\Metadata\Collection
+public __construct (
+ array $items = []
+ ):
+
array
public count ( ): int
+
int
public current ( ): mixed
+
mixed
public key ( ): int
+
int
public next ( ): void
+
public rewind ( ): void
+
public valid ( ): bool
+
bool
Class \RdKafka\Metadata\Partition
+public __construct (
+ int $id,
+ int $err,
+ int $leader,
+ \RdKafka\Metadata\Collection $replicas,
+ \RdKafka\Metadata\Collection $isrs
+ ):
+
int
int
int
\RdKafka\Metadata\Collection
\RdKafka\Metadata\Collection
public getErr ( ): int
+
int
public getId ( ): int
+
int
public getIsrs ( ): \RdKafka\Metadata\Collection
+
\RdKafka\Metadata\Collection
public getLeader ( ): int
+
int
public getReplicas ( ): \RdKafka\Metadata\Collection
+
\RdKafka\Metadata\Collection
Class \RdKafka\Metadata\Topic
+public __construct (
+ string $topic,
+ \RdKafka\Metadata\Collection $partitions,
+ int $err
+ ):
+
string
\RdKafka\Metadata\Collection
int
public getErr ( ): int
+
int
public getPartitions ( ): \RdKafka\Metadata\Collection|\RdKafka\Metadata\Partition[]
+
\RdKafka\Metadata\Collection|\RdKafka\Metadata\Partition[]
public getTopic ( ): string
+
string
Class \RdKafka\Metadata
+public __construct (
+ \RdKafka $kafka,
+ bool $all_topics,
+ ?\RdKafka\Topic $only_topic,
+ int $timeout_ms
+ ):
+
\RdKafka
bool
?\RdKafka\Topic
int
public __destruct ( ):
+
public getBrokers ( ): \RdKafka\Metadata\Collection|\RdKafka\Metadata\Broker[]
+
\RdKafka\Metadata\Collection|\RdKafka\Metadata\Broker[]
public getOrigBrokerId ( ): int
+
int
public getOrigBrokerName ( ): string
+
string
public getTopics ( ): \RdKafka\Metadata\Collection|\RdKafka\Metadata\Topic[]
+
\RdKafka\Metadata\Collection|\RdKafka\Metadata\Topic[]
Class \RdKafka\Producer
+public __construct (
+ ?\RdKafka\Conf $conf = null
+ ):
+
?\RdKafka\Conf
public abortTransaction (
+ int $timeout_ms
+ ): void
+
int
public addBrokers (
+ string $broker_list
+ ): int
+
string
int
public beginTransaction ( ): void
+
public commitTransaction (
+ int $timeout_ms
+ ): void
+
int
public flush (
+ int $timeout_ms
+ ): int
+
int
int
public getOutQLen ( ): int
+
int
public initTransactions (
+ int $timeout_ms
+ ): void
+
Initializing transactions must be done before producing and starting a transaction
+int
public newTopic (
+ string $topic_name,
+ ?\RdKafka\TopicConf $topic_conf = null
+ ): \RdKafka\ProducerTopic
+
string
?\RdKafka\TopicConf
\RdKafka\ProducerTopic
public poll (
+ int $timeout_ms
+ ): int
+
int
int
public purge (
+ int $purge_flags
+ ): int
+
int
int
Class \RdKafka\ProducerTopic
+public __construct (
+ \RdKafka\Producer $producer,
+ string $name,
+ ?\RdKafka\TopicConf $conf = null
+ ):
+
\RdKafka\Producer
string
?\RdKafka\TopicConf
public produce (
+ int $partition,
+ int $msgflags,
+ ?string $payload = null,
+ ?string $key = null,
+ mixed $opaque = null
+ ): void
+
int
int
?string
?string
mixed
public producev (
+ int $partition,
+ int $msgflags,
+ ?string $payload = null,
+ ?string $key = null,
+ ?array $headers = null,
+ ?int $timestamp_ms = null,
+ mixed $opaque = null
+ ): void
+
int
int
?string
?string
?array
?int
mixed
Class \RdKafka\Queue
+public __construct (
+ \FFI\CData $queue
+ ):
+
\FFI\CData
public __destruct ( ):
+
public consume (
+ int $timeout_ms
+ ): ?\RdKafka\Message
+
int
?\RdKafka\Message
public static fromRdKafka (
+ \RdKafka $kafka
+ ): self
+
\RdKafka
self
public getCData ( ): \FFI\CData
+
\FFI\CData
public poll (
+ int $timeout_ms
+ ): ?\RdKafka\Event
+
int
?\RdKafka\Event
Class \RdKafka\Test\ApiKey
+See also
+ +public AddOffsetsToTxn = 25
+
public AddPartitionsToTxn = 24
+
public AlterConfigs = 33
+
public AlterReplicaLogDirs = 34
+
public ApiVersion = 18
+
public ControlledShutdown = 7
+
public CreateAcls = 30
+
public CreateDelegationToken = 38
+
public CreatePartitions = 37
+
public CreateTopics = 19
+
public DeleteAcls = 31
+
public DeleteGroups = 42
+
public DeleteRecords = 21
+
public DeleteTopics = 20
+
public DescribeAcls = 29
+
public DescribeConfigs = 32
+
public DescribeDelegationToken = 41
+
public DescribeGroups = 15
+
public DescribeLogDirs = 35
+
public EndTxn = 26
+
public ExpireDelegationToken = 40
+
public Fetch = 1
+
public FindCoordinator = 10
+
public Heartbeat = 12
+
public InitProducerId = 22
+
public JoinGroup = 11
+
public LeaderAndIsr = 4
+
public LeaveGroup = 13
+
public ListGroups = 16
+
public Metadata = 3
+
public None = -1
+
public Offset = 2
+
public OffsetCommit = 8
+
public OffsetFetch = 9
+
public OffsetForLeaderEpoch = 23
+
public Produce = 0
+
public RenewDelegationToken = 39
+
public SaslAuthenticate = 36
+
public SaslHandshake = 17
+
public StopReplica = 5
+
public SyncGroup = 14
+
public TxnOffsetCommit = 28
+
public UpdateMetadata = 6
+
public WriteTxnMarkers = 27
+
Class \RdKafka\Test\MockCluster
+Note: MockCluster is experimental - even in librdkafka! +Expect breaking changes within minor versions of this library.
+public __destruct ( ):
+
public static create (
+ int $brokerCount,
+ ?\RdKafka\Conf $conf = null
+ ): self
+
int
?\RdKafka\Conf
self
public createTopic (
+ string $topic,
+ int $partitionCount,
+ int $replicationFactor
+ ): void
+
Creates a topic.
+This is an alternative to automatic topic creation as performed by +the client itself. +The Topic Admin API (CreateTopics) is not supported by the +mock broker.
+string
int
int
public static fromProducer (
+ \RdKafka\Producer $producer
+ ): self
+
Derive mock cluster from Producer created by setting
+the test.mock.num.brokers
configuration property.
\RdKafka\Producer
self
public getBootstraps ( ): string
+
string
the mock cluster’s bootstrap.servers listpublic pushBrokerRequestErrorRtts (
+ int $brokerId,
+ int $apiKey,
+ int $count,
+ int[] $errorCodeAndRttTuples
+ ): void
+
Same as {@link MockCluster::pushBrokerRequestErrors()} but for a specific broker.
+The broker errors take precedence over the cluster errors.
+int
int
int
int[]
plain tuples of error code or 0 (int) and response RTT/delay in millisecond (int)public pushBrokerRequestErrors (
+ int $brokerId,
+ int $apiKey,
+ int $count,
+ int[] $errorCodes
+ ): void
+
Same as {@link MockCluster::pushRequestErrors()} but for a specific broker.
+The broker errors take precedence over the cluster errors.
+int
int
int
int[]
a list of error codes or 0public pushRequestErrors (
+ int $apiKey,
+ int $count,
+ int $errorCodes
+ ): void
+
Push cnt errors onto the cluster’s error stack for the given apiKey.
+ApiKey is the Kafka protocol request type, e.g., Produce (0).
+The following cnt protocol requests matching apiKey will fail with the +provided error code and removed from the stack, starting with +the first error code, then the second, etc.
+int
int
int
public pushRequestErrorsArray (
+ int $apiKey,
+ int $count,
+ int[] $errorCodes
+ ): void
+
See {@link MockCluster::pushRequestErrors()}
+int
int
int[]
public setApiVersion (
+ int $apiKey,
+ int $minVersion,
+ int $maxVersion
+ ): void
+
Set the allowed ApiVersion range for apiKey.
+Set minVersion and maxVersion to -1 to disable the API completely. +MaxVersion MUST not exceed the maximum implemented value.
+int
Protocol request type/keyint
Minimum version supported (or -1 to disable).int
Maximum version supported (or -1 to disable).public setBrokerDown (
+ int $brokerId
+ ): void
+
Disconnects the broker and disallows any new connections.
+This does NOT trigger leader change.
+int
public setBrokerRack (
+ int $brokerId,
+ string $rack
+ ): void
+
Sets the broker’s rack as reported in Metadata to the client.
+int
string
public setBrokerUp (
+ int $brokerId
+ ): void
+
Makes the broker accept connections again.
+This does NOT trigger leader change.
+int
public setCoordinator (
+ string $keyType,
+ string $key,
+ int $brokerId
+ ): void
+
Explicitly sets the coordinator.
+If this API is not a standard hashing scheme will be used.
+string
“transaction” or “group”string
The transactional.id or group.idint
The new coordinator, does not have to be a valid broker.public setPartitionFollower (
+ string $topic,
+ int $partition,
+ int $brokerId
+ ): void
+
Sets the partition’s preferred replica / follower.
+The topic will be created if it does not exist.
+string
int
int
does not need to point to an existing broker.public setPartitionFollowerWatermarks (
+ string $topic,
+ int $partition,
+ int $low,
+ int $high
+ ): void
+
Sets the partition’s preferred replica / follower low and high watermarks.
+The topic will be created if it does not exist. +Setting an offset to -1 will revert back to the leader’s corresponding watermark.
+string
int
int
int
public setPartitionLeader (
+ string $topic,
+ int $partition,
+ int $brokerId
+ ): void
+
Sets the partition leader.
+The topic will be created if it does not exist.
+string
int
int
needs to be an existing brokerpublic setRtt (
+ int $brokerId,
+ int $roundTripTimeDelayMs
+ ): void
+
Set broker round-trip-time delay in milliseconds.
+int
int
public setTopicError (
+ string $topic,
+ int $errorCode
+ ): void
+
Set the topic error to return in protocol requests.
+Currently only used for TopicMetadataRequest and AddPartitionsToTxnRequest.
+string
int
abstract Class \RdKafka\Topic
+public __construct (
+ \RdKafka $kafka,
+ string $name,
+ ?\RdKafka\TopicConf $conf = null
+ ):
+
\RdKafka
string
?\RdKafka\TopicConf
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
public getName ( ): string
+
string
Class \RdKafka\TopicConf
+See also
+ +public __construct ( ):
+
public __destruct ( ):
+
public dump ( ): array
+
array
public getCData ( ): \FFI\CData
+
\FFI\CData
public getOpaque ( ): mixed|null
+
mixed|null
public set (
+ string $name,
+ string $value
+ ): void
+
string
string
public setOpaque (
+ mixed $opaque
+ ): void
+
mixed
public setPartitioner (
+ int $partitioner
+ ): void
+
int
public setPartitionerCb (
+ callable $callback
+ ): void
+
callable
Class \RdKafka\TopicPartition
+public __construct (
+ string $topic,
+ int $partition,
+ int $offset,
+ string|null $metadata = null
+ ):
+
string
int
int
string|null
requires librdkafka >= 1.2.0public static fromCData (
+ \FFI\CData $topicPartition
+ ): self
+
\FFI\CData
self
public getErr ( ): ?int
+
?int
public getMetadata ( ): ?string
+
?string
public getMetadataSize ( ): int
+
int
public getOffset ( ): int
+
int
public getOpqaque ( ): ?object
+
?object
public getPartition ( ): int
+
int
public getTopic ( ): string
+
string
public setMetadata (
+ ?string $metadata
+ ): void
+
?string
public setOffset (
+ int $offset
+ ): void
+
int
public setPartition (
+ int $partition
+ ): void
+
int
public setTopic (
+ string $topic_name
+ ): void
+
string
Class \RdKafka\TopicPartitionList
+public __construct (
+ \RdKafka\TopicPartition[] $items
+ ):
+
\RdKafka\TopicPartition[]
public asArray ( ): \RdKafka\TopicPartition[]
+
\RdKafka\TopicPartition[]
public count ( ): int
+
int
public current ( ): \RdKafka\TopicPartition
+
\RdKafka\TopicPartition
public static fromCData (
+ \FFI\CData $topicPartitionList
+ ): self
+
\FFI\CData
self
public getCData ( ): \FFI\CData
+
\FFI\CData
public key ( ): int
+
int
public next ( ): void
+
public rewind ( ): void
+
public valid ( ): bool
+
bool
abstract Class \RdKafka
+public __construct (
+ int $type,
+ ?\RdKafka\Conf $conf = null
+ ):
+
int
?\RdKafka\Conf
public __destruct ( ):
+
public getCData ( ): \FFI\CData
+
\FFI\CData
public getMetadata (
+ bool $all_topics,
+ ?\RdKafka\Topic $only_topic,
+ int $timeout_ms
+ ): \RdKafka\Metadata
+
bool
?\RdKafka\Topic
int
\RdKafka\Metadata
public getOpaque ( ): mixed|null
+
mixed|null
public pausePartitions (
+ \TopicPartition[] $topicPartitions
+ ): \TopicPartition[]
+
\TopicPartition[]
\TopicPartition[]
public queryWatermarkOffsets (
+ string $topic,
+ int $partition,
+ int &$low,
+ int &$high,
+ int $timeout_ms
+ ): void
+
string
int
int
int
int
public static resolveFromCData (
+ ?\FFI\CData $kafka = null
+ ): ?self
+
?\FFI\CData
?self
public resumePartitions (
+ \TopicPartition[] $topicPartitions
+ ): \TopicPartition[]
+
\TopicPartition[]
\TopicPartition[]
public setLogLevel (
+ int $level
+ ): void
+
int
Deprecated
+Set via Conf parameter log_level instead
+public setLogger (
+ int $logger
+ ): void
+
int
Deprecated
+Use Conf::setLogCb instead
+public RD_KAFKA_LOG_PRINT = 100
+
public RD_KAFKA_LOG_SYSLOG = 101
+
public RD_KAFKA_LOG_SYSLOG_PRINT = 102
+
public RD_KAFKA_MSG_PARTITIONER_RANDOM = 2
+
public RD_KAFKA_MSG_PARTITIONER_CONSISTENT = 3
+
public RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM = 4
+
public RD_KAFKA_MSG_PARTITIONER_MURMUR2 = 5
+
public RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM = 6
+
public RD_KAFKA_MSG_PARTITIONER_FNV1A = 7
+
public RD_KAFKA_MSG_PARTITIONER_FNV1A_RANDOM = 8
+
public RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE = 8
+
Flags for rd_kafka_destroy_flags()
+Don't call consumer_close() to leave group and commit final offsets.
+This also disables consumer callbacks to be called from rd_kafka_destroy*(), such as rebalance_cb.
+The consumer group handler is still closed internally, but from an application perspective none of the functionality from consumer_close() is performed.
+ +See also
+ +public RD_KAFKA_PARTITION_UA = -1
+
Unassigned partition.
+The unassigned partition is used by the producer API for messages that should be partitioned using the configured or default partitioner.
+ +See also
+ +public RD_KAFKA_OFFSET_BEGINNING = -2
+
Start consuming from beginning of \ kafka partition queue: oldest msg
+ +See also
+ +public RD_KAFKA_OFFSET_END = -1
+
Start consuming from end of kafka \ partition queue: next msg
+ +See also
+ +public RD_KAFKA_OFFSET_STORED = -1000
+
Start consuming from offset retrieved \ from offset store
+ +See also
+ +public RD_KAFKA_OFFSET_INVALID = -1001
+
Invalid offset
+ +See also
+ +public RD_KAFKA_OFFSET_TAIL_BASE = -2000
+
public RD_KAFKA_MSG_F_FREE = 1
+
Producer message flags.
+Delegate freeing of payload to rdkafka. \
+ +See also
+ +public RD_KAFKA_MSG_F_COPY = 2
+
rdkafka will make a copy of the payload. \
+ +See also
+ +public RD_KAFKA_MSG_F_BLOCK = 4
+
Block produce*() on message queue full. \ WARNING: If a delivery report callback \ is used, the application MUST \ call rd_kafka_poll() (or equiv.) \ to make sure delivered messages \ are drained from the internal \ delivery report queue. \ Failure to do so will result \ in indefinitely blocking on \ the produce() call when the \ message queue is full.
+ +See also
+ +public RD_KAFKA_MSG_F_PARTITION = 8
+
produce_batch() will honor \ per-message partition.
+ +See also
+ +public RD_KAFKA_PURGE_F_QUEUE = 1
+
Flags for rd_kafka_purge()
+Purge messages in internal queues.
+ +See also
+ +public RD_KAFKA_PURGE_F_INFLIGHT = 2
+
Purge messages in-flight to or from the broker. Purging these messages will void any future acknowledgements from the broker, making it impossible for the application to know if these messages were successfully delivered or not. Retrying these messages may lead to duplicates.
+ +See also
+ +public RD_KAFKA_PURGE_F_NON_BLOCKING = 4
+
Don't wait for background thread queue purging to finish.
+ +See also
+ +public RD_KAFKA_EVENT_NONE = 0
+
Unset value
+ +See also
+ +public RD_KAFKA_EVENT_DR = 1
+
Producer Delivery report batch
+ +See also
+ +public RD_KAFKA_EVENT_FETCH = 2
+
Fetched message (consumer)
+ +See also
+ +public RD_KAFKA_EVENT_LOG = 4
+
Log message
+ +See also
+ +public RD_KAFKA_EVENT_ERROR = 8
+
Error
+ +See also
+ +public RD_KAFKA_EVENT_REBALANCE = 16
+
Group rebalance (consumer)
+ +See also
+ +public RD_KAFKA_EVENT_OFFSET_COMMIT = 32
+
Offset commit result
+ +See also
+ +public RD_KAFKA_EVENT_STATS = 64
+
Stats
+ +See also
+ +public RD_KAFKA_EVENT_CREATETOPICS_RESULT = 100
+
CreateTopics_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DELETETOPICS_RESULT = 101
+
DeleteTopics_result_t
+ +See also
+ +public RD_KAFKA_EVENT_CREATEPARTITIONS_RESULT = 102
+
CreatePartitions_result_t
+ +See also
+ +public RD_KAFKA_EVENT_ALTERCONFIGS_RESULT = 103
+
AlterConfigs_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DESCRIBECONFIGS_RESULT = 104
+
DescribeConfigs_result_t
+ +See also
+ +public RD_KAFKA_PRODUCER = 0
+
Producer client
+ +See also
+ +public RD_KAFKA_CONSUMER = 1
+
Consumer client
+ +See also
+ +public RD_KAFKA_TIMESTAMP_NOT_AVAILABLE = 0
+
Timestamp not available
+ +See also
+ +public RD_KAFKA_TIMESTAMP_CREATE_TIME = 1
+
Message creation time
+ +See also
+ +public RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME = 2
+
Log append time
+ +See also
+ +public RD_KAFKA_RESP_ERR__BEGIN = -200
+
Begin internal error codes
+ +See also
+ +public RD_KAFKA_RESP_ERR__BAD_MSG = -199
+
Received message is incorrect
+ +See also
+ +public RD_KAFKA_RESP_ERR__BAD_COMPRESSION = -198
+
Bad/unknown compression
+ +See also
+ +public RD_KAFKA_RESP_ERR__DESTROY = -197
+
Broker is going away
+ +See also
+ +public RD_KAFKA_RESP_ERR__FAIL = -196
+
Generic failure
+ +See also
+ +public RD_KAFKA_RESP_ERR__TRANSPORT = -195
+
Broker transport failure
+ +See also
+ +public RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = -194
+
Critical system resource
+ +See also
+ +public RD_KAFKA_RESP_ERR__RESOLVE = -193
+
Failed to resolve broker
+ +See also
+ +public RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = -192
+
Produced message timed out
+ +See also
+ +public RD_KAFKA_RESP_ERR__PARTITION_EOF = -191
+
Reached the end of the topic+partition queue on the broker. Not really an error. This event is disabled by default, see the enable.partition.eof
configuration property.
See also
+ +public RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = -190
+
Permanent: Partition does not exist in cluster.
+ +See also
+ +public RD_KAFKA_RESP_ERR__FS = -189
+
File or filesystem error
+ +See also
+ +public RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = -188
+
Permanent: Topic does not exist in cluster.
+ +See also
+ +public RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = -187
+
All broker connections are down.
+ +See also
+ +public RD_KAFKA_RESP_ERR__INVALID_ARG = -186
+
Invalid argument, or invalid configuration
+ +See also
+ +public RD_KAFKA_RESP_ERR__TIMED_OUT = -185
+
Operation timed out
+ +See also
+ +public RD_KAFKA_RESP_ERR__QUEUE_FULL = -184
+
Queue is full
+ +See also
+ +public RD_KAFKA_RESP_ERR__ISR_INSUFF = -183
+
ISR count < required.acks
+ +See also
+ +public RD_KAFKA_RESP_ERR__NODE_UPDATE = -182
+
Broker node update
+ +See also
+ +public RD_KAFKA_RESP_ERR__SSL = -181
+
SSL error
+ +See also
+ +public RD_KAFKA_RESP_ERR__WAIT_COORD = -180
+
Waiting for coordinator to become available.
+ +See also
+ +public RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = -179
+
Unknown client group
+ +See also
+ +public RD_KAFKA_RESP_ERR__IN_PROGRESS = -178
+
Operation in progress
+ +See also
+ +public RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = -177
+
Previous operation in progress, wait for it to finish.
+ +See also
+ +public RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = -176
+
This operation would interfere with an existing subscription
+ +See also
+ +public RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = -175
+
Assigned partitions (rebalance_cb)
+ +See also
+ +public RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = -174
+
Revoked partitions (rebalance_cb)
+ +See also
+ +public RD_KAFKA_RESP_ERR__CONFLICT = -173
+
Conflicting use
+ +See also
+ +public RD_KAFKA_RESP_ERR__STATE = -172
+
Wrong state
+ +See also
+ +public RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = -171
+
Unknown protocol
+ +See also
+ +public RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = -170
+
Not implemented
+ +See also
+ +public RD_KAFKA_RESP_ERR__AUTHENTICATION = -169
+
Authentication failure
+ +See also
+ +public RD_KAFKA_RESP_ERR__NO_OFFSET = -168
+
No stored offset
+ +See also
+ +public RD_KAFKA_RESP_ERR__OUTDATED = -167
+
Outdated
+ +See also
+ +public RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = -166
+
Timed out in queue
+ +See also
+ +public RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = -165
+
Feature not supported by broker
+ +See also
+ +public RD_KAFKA_RESP_ERR__WAIT_CACHE = -164
+
Awaiting cache update
+ +See also
+ +public RD_KAFKA_RESP_ERR__INTR = -163
+
Operation interrupted (e.g., due to yield))
+ +See also
+ +public RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = -162
+
Key serialization error
+ +See also
+ +public RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = -161
+
Value serialization error
+ +See also
+ +public RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = -160
+
Key deserialization error
+ +See also
+ +public RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = -159
+
Value deserialization error
+ +See also
+ +public RD_KAFKA_RESP_ERR__PARTIAL = -158
+
Partial response
+ +See also
+ +public RD_KAFKA_RESP_ERR__READ_ONLY = -157
+
Modification attempted on read-only object
+ +See also
+ +public RD_KAFKA_RESP_ERR__NOENT = -156
+
No such entry / item not found
+ +See also
+ +public RD_KAFKA_RESP_ERR__UNDERFLOW = -155
+
Read underflow
+ +See also
+ +public RD_KAFKA_RESP_ERR__INVALID_TYPE = -154
+
Invalid type
+ +See also
+ +public RD_KAFKA_RESP_ERR__RETRY = -153
+
Retry operation
+ +See also
+ +public RD_KAFKA_RESP_ERR__PURGE_QUEUE = -152
+
Purged in queue
+ +See also
+ +public RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = -151
+
Purged in flight
+ +See also
+ +public RD_KAFKA_RESP_ERR__FATAL = -150
+
Fatal error: see rd_kafka_fatal_error()
+ +See also
+ +public RD_KAFKA_RESP_ERR__INCONSISTENT = -149
+
Inconsistent state
+ +See also
+ +public RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = -148
+
Gap-less ordering would not be guaranteed if proceeding
+ +See also
+ +public RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = -147
+
Maximum poll interval exceeded
+ +See also
+ +public RD_KAFKA_RESP_ERR__END = -100
+
End internal error codes
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNKNOWN = -1
+
Unknown broker error
+ +See also
+ +public RD_KAFKA_RESP_ERR_NO_ERROR = 0
+
Success
+ +See also
+ +public RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1
+
Offset out of range
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_MSG = 2
+
Invalid message
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3
+
Unknown topic or partition
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4
+
Invalid message size
+ +See also
+ +public RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5
+
Leader not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6
+
Not leader for partition
+ +See also
+ +public RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7
+
Request timed out
+ +See also
+ +public RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8
+
Broker not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9
+
Replica not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10
+
Message size too large
+ +See also
+ +public RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11
+
StaleControllerEpochCode
+ +See also
+ +public RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12
+
Offset metadata string too large
+ +See also
+ +public RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13
+
Broker disconnected before response received
+ +See also
+ +public RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14
+
Group coordinator load in progress
+ +See also
+ +public RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15
+
Group coordinator not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16
+
Not coordinator for group
+ +See also
+ +public RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17
+
Invalid topic
+ +See also
+ +public RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18
+
Message batch larger than configured server segment size
+ +See also
+ +public RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19
+
Not enough in-sync replicas
+ +See also
+ +public RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20
+
Message(s) written to insufficient number of in-sync replicas
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21
+
Invalid required acks value
+ +See also
+ +public RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22
+
Specified group generation id is not valid
+ +See also
+ +public RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23
+
Inconsistent group protocol
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24
+
Invalid group.id
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25
+
Unknown member
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26
+
Invalid session timeout
+ +See also
+ +public RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27
+
Group rebalance in progress
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28
+
Commit offset data size is not valid
+ +See also
+ +public RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29
+
Topic authorization failed
+ +See also
+ +public RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30
+
Group authorization failed
+ +See also
+ +public RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31
+
Cluster authorization failed
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32
+
Invalid timestamp
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33
+
Unsupported SASL mechanism
+ +See also
+ +public RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34
+
Illegal SASL state
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35
+
Unuspported version
+ +See also
+ +public RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36
+
Topic already exists
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37
+
Invalid number of partitions
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38
+
Invalid replication factor
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39
+
Invalid replica assignment
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40
+
Invalid config
+ +See also
+ +public RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41
+
Not controller for cluster
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42
+
Invalid request
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43
+
Message format on broker does not support request
+ +See also
+ +public RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44
+
Policy violation
+ +See also
+ +public RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45
+
Broker received an out of order sequence number
+ +See also
+ +public RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46
+
Broker received a duplicate sequence number
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47
+
Producer attempted an operation with an old epoch
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48
+
Producer attempted a transactional operation in an invalid state
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49
+
Producer attempted to use a producer id which is not currently assigned to its transactional id
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50
+
Transaction timeout is larger than the maximum value allowed by the broker's max.transaction.timeout.ms
+ +See also
+ +public RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51
+
Producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing
+ +See also
+ +public RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52
+
Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer
+ +See also
+ +public RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53
+
Transactional Id authorization failed
+ +See also
+ +public RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54
+
Security features are disabled
+ +See also
+ +public RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55
+
Operation not attempted
+ +See also
+ +public RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56
+
Disk error when trying to access log file on the disk
+ +See also
+ +public RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57
+
The user-specified log directory is not found in the broker config
+ +See also
+ +public RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58
+
SASL Authentication failed
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59
+
Unknown Producer Id
+ +See also
+ +public RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60
+
Partition reassignment is in progress
+ +See also
+ +public RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61
+
Delegation Token feature is not enabled
+ +See also
+ +public RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62
+
Delegation Token is not found on server
+ +See also
+ +public RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63
+
Specified Principal is not valid Owner/Renewer
+ +See also
+ +public RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64
+
Delegation Token requests are not allowed on this connection
+ +See also
+ +public RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65
+
Delegation Token authorization failed
+ +See also
+ +public RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66
+
Delegation Token is expired
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67
+
Supplied principalType is not supported
+ +See also
+ +public RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68
+
The group is not empty
+ +See also
+ +public RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69
+
The group id does not exist
+ +See also
+ +public RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70
+
The fetch session ID was not found
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71
+
The fetch session epoch is invalid
+ +See also
+ +public RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72
+
No matching listener
+ +See also
+ +public RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73
+
Topic deletion is disabled
+ +See also
+ +public RD_KAFKA_VTYPE_END = 0
+
va-arg sentinel
+ +See also
+ +public RD_KAFKA_VTYPE_TOPIC = 1
+
(const char *) Topic name
+ +See also
+ +public RD_KAFKA_VTYPE_RKT = 2
+
(rd_kafka_topic_t *) Topic handle
+ +See also
+ +public RD_KAFKA_VTYPE_PARTITION = 3
+
(int32_t) Partition
+ +See also
+ +public RD_KAFKA_VTYPE_VALUE = 4
+
(void *, size_t) Message value (payload)
+ +See also
+ +public RD_KAFKA_VTYPE_KEY = 5
+
(void *, size_t) Message key
+ +See also
+ +public RD_KAFKA_VTYPE_OPAQUE = 6
+
(void *) Per-message application opaque value. This is the same as the _private field in rd_kafka_message_t, also known as the msg_opaque.
+ +See also
+ +public RD_KAFKA_VTYPE_MSGFLAGS = 7
+
(int) RD_KAFKA_MSG_F_.. flags
+ +See also
+ +public RD_KAFKA_VTYPE_TIMESTAMP = 8
+
(int64_t) Milliseconds since epoch UTC
+ +See also
+ +public RD_KAFKA_VTYPE_HEADER = 9
+
(const char *, const void *, ssize_t) Message Header
+ +See also
+ +public RD_KAFKA_VTYPE_HEADERS = 10
+
(rd_kafka_headers_t *) Headers list
+ +See also
+ +public RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0
+
Message was never transmitted to the broker, or failed with an error indicating it was not written to the log. Application retry risks ordering, but not duplication.
+ +See also
+ +public RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1
+
Message was transmitted to broker, but no acknowledgement was received. Application retry risks ordering and duplication.
+ +See also
+ +public RD_KAFKA_MSG_STATUS_PERSISTED = 2
+
Message was written to the log and acknowledged by the broker. No reason for application to retry. Note: this value should only be trusted with acks=all
.
See also
+ +public RD_KAFKA_CONF_UNKNOWN = -2
+
Unknown configuration name.
+ +See also
+ +public RD_KAFKA_CONF_INVALID = -1
+
Invalid configuration value or property or value not supported in this build.
+ +See also
+ +public RD_KAFKA_CONF_OK = 0
+
Configuration okay
+ +See also
+ +public RD_KAFKA_ADMIN_OP_ANY = 0
+
Default value
+ +See also
+ +public RD_KAFKA_ADMIN_OP_CREATETOPICS = 1
+
CreateTopics
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DELETETOPICS = 2
+
DeleteTopics
+ +See also
+ +public RD_KAFKA_ADMIN_OP_CREATEPARTITIONS = 3
+
CreatePartitions
+ +See also
+ +public RD_KAFKA_ADMIN_OP_ALTERCONFIGS = 4
+
AlterConfigs
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS = 5
+
DescribeConfigs
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0
+
Source unknown, e.g., in the ConfigEntry used for alter requests where source is not set
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1
+
Dynamic topic config that is configured for a specific topic
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2
+
Dynamic broker config that is configured for a specific broker
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3
+
Dynamic broker config that is configured as default for all brokers in the cluster
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4
+
Static broker config provided as broker properties at startup (e.g. from server.properties file)
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5
+
Built-in default configuration for configs that have a default value
+ +See also
+ +public RD_KAFKA_CONFIG_SOURCE__CNT = 6
+
Number of source types defined
+ +See also
+ +public RD_KAFKA_RESOURCE_UNKNOWN = 0
+
Unknown
+ +See also
+ +public RD_KAFKA_RESOURCE_ANY = 1
+
Any (used for lookups)
+ +See also
+ +public RD_KAFKA_RESOURCE_TOPIC = 2
+
Topic
+ +See also
+ +public RD_KAFKA_RESOURCE_GROUP = 3
+
Group
+ +See also
+ +public RD_KAFKA_RESOURCE_BROKER = 4
+
Broker
+ +See also
+ +public RD_KAFKA_RESOURCE__CNT = 5
+
Number of resource types defined
+ +See also
+ +public RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74
+
Leader epoch is older than broker epoch
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75
+
Leader epoch is newer than broker epoch
+ +See also
+ +public RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77
+
Broker epoch has changed
+ +See also
+ +public RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78
+
Leader high watermark is not caught up
+ +See also
+ +public RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79
+
Group member needs a valid member ID
+ +See also
+ +public RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80
+
Preferred leader was not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81
+
Consumer group has reached maximum size
+ +See also
+ +public RD_KAFKA_EVENT_OAUTHBEARER_TOKEN_REFRESH = 256
+
SASL/OAUTHBEARER token needs to be refreshed
+ +See also
+ +public RD_KAFKA_CERT_PUBLIC_KEY = 0
+
Client's public key
+ +See also
+ +public RD_KAFKA_CERT_PRIVATE_KEY = 1
+
Client's private key
+ +See also
+ +public RD_KAFKA_CERT_CA = 2
+
CA certificate
+ +See also
+ +public RD_KAFKA_CERT__CNT = 3
+
public RD_KAFKA_CERT_ENC_PKCS12 = 0
+
PKCS#12
+ +See also
+ +public RD_KAFKA_CERT_ENC_DER = 1
+
DER / binary X.509 ASN1
+ +See also
+ +public RD_KAFKA_CERT_ENC_PEM = 2
+
PEM
+ +See also
+ +public RD_KAFKA_CERT_ENC__CNT = 3
+
public RD_KAFKA_THREAD_MAIN = 0
+
librdkafka's internal main thread
+ +See also
+ +public RD_KAFKA_THREAD_BACKGROUND = 1
+
Background thread (if enabled)
+ +See also
+ +public RD_KAFKA_THREAD_BROKER = 2
+
Per-broker thread
+ +See also
+ +public RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = -146
+
Unknown broker
+ +See also
+ +public RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14
+
Coordinator load in progress
+ +See also
+ +public RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15
+
Coordinator not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16
+
Not coordinator
+ +See also
+ +public RD_KAFKA_RESP_ERR__NOT_CONFIGURED = -145
+
Functionality not configured
+ +See also
+ +public RD_KAFKA_RESP_ERR__FENCED = -144
+
Instance has been fenced
+ +See also
+ +public RD_KAFKA_RESP_ERR__APPLICATION = -143
+
Application generated error
+ +See also
+ +public RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82
+
Static consumer fenced by other consumer with same group.instance.id.
+ +See also
+ +public RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83
+
Eligible partition leaders are not available
+ +See also
+ +public RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84
+
Leader election not needed for topic partition
+ +See also
+ +public RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85
+
No partition reassignment is in progress
+ +See also
+ +public RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86
+
Deleting offsets of a topic while the consumer group is subscribed to it
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_RECORD = 87
+
Broker failed to validate record
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88
+
There are unstable offsets that need to be cleared
+ +See also
+ +public RD_KAFKA_EVENT_DELETERECORDS_RESULT = 105
+
DeleteRecords_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DELETEGROUPS_RESULT = 106
+
DeleteGroups_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DELETECONSUMERGROUPOFFSETS_RESULT = 107
+
DeleteConsumerGroupOffsets_result_t
+ +See also
+ +public RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = -142
+
Assignment lost
+ +See also
+ +public RD_KAFKA_RESP_ERR__NOOP = -141
+
No operation performed
+ +See also
+ +public RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89
+
Throttling quota has been exceeded
+ +See also
+ +public RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90
+
There is a newer producer with the same transactionalId which fences the current one
+ +See also
+ +public RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91
+
Request illegally referred to resource that does not exist
+ +See also
+ +public RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92
+
Request illegally referred to the same resource twice
+ +See also
+ +public RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93
+
Requested credential would not meet criteria for acceptability
+ +See also
+ +public RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94
+
Indicates that the either the sender or recipient of a voter-only request is not one of the expected voters
+ +See also
+ +public RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95
+
Invalid update version
+ +See also
+ +public RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96
+
Unable to update finalized features due to server error
+ +See also
+ +public RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97
+
Request principal deserialization failed during forwarding
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DELETERECORDS = 6
+
DeleteRecords
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DELETEGROUPS = 7
+
DeleteGroups
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS = 8
+
DeleteConsumerGroupOffsets
+ +See also
+ +public RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = -140
+
No offset to automatically reset to
+ +See also
+ +public RD_KAFKA_EVENT_BACKGROUND = 512
+
Enable background thread.
+ +See also
+ +public RD_KAFKA_EVENT_CREATEACLS_RESULT = 1024
+
CreateAcls_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DESCRIBEACLS_RESULT = 2048
+
DescribeAcls_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DELETEACLS_RESULT = 4096
+
DeleteAcls_result_t
+ +See also
+ +public RD_KAFKA_ADMIN_OP_CREATEACLS = 9
+
CreateAcls
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DESCRIBEACLS = 10
+
DescribeAcls
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DELETEACLS = 11
+
DeleteAcls
+ +See also
+ +public RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0
+
Unknown
+ +See also
+ +public RD_KAFKA_RESOURCE_PATTERN_ANY = 1
+
Any (used for lookups)
+ +See also
+ +public RD_KAFKA_RESOURCE_PATTERN_MATCH = 2
+
Match: will perform pattern matching
+ +See also
+ +public RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3
+
Literal: A literal resource name
+ +See also
+ +public RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4
+
Prefixed: A prefixed resource name
+ +See also
+ +public RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT = 5
+
public RD_KAFKA_ACL_OPERATION_UNKNOWN = 0
+
Unknown
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_ANY = 1
+
In a filter, matches any AclOperation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_ALL = 2
+
ALL operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_READ = 3
+
READ operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_WRITE = 4
+
WRITE operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_CREATE = 5
+
CREATE operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_DELETE = 6
+
DELETE operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_ALTER = 7
+
ALTER operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_DESCRIBE = 8
+
DESCRIBE operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9
+
CLUSTER_ACTION operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10
+
DESCRIBE_CONFIGS operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11
+
ALTER_CONFIGS operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12
+
IDEMPOTENT_WRITE operation
+ +See also
+ +public RD_KAFKA_ACL_OPERATION__CNT = 13
+
public RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0
+
Unknown
+ +See also
+ +public RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1
+
In a filter, matches any AclPermissionType
+ +See also
+ +public RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2
+
Disallows access
+ +See also
+ +public RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3
+
Grants access.
+ +See also
+ +public RD_KAFKA_ACL_PERMISSION_TYPE__CNT = 4
+
public RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT = 8192
+
ListConsumerGroupsResult_t
+ +See also
+ +public RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT = 16384
+
DescribeConsumerGroups_result_t
+ +See also
+ +public RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT = 32768
+
ListConsumerGroupOffsets_result_t
+ +See also
+ +public RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT = 65536
+
AlterConsumerGroupOffsets_result_t
+ +See also
+ +public RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0
+
public RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1
+
public RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2
+
public RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3
+
public RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4
+
public RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5
+
public RD_KAFKA_CONSUMER_GROUP_STATE__CNT = 6
+
public RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS = 12
+
ListConsumerGroups
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS = 13
+
DescribeConsumerGroups
+ +See also
+ +public RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS = 14
+
ListConsumerGroupOffsets
+ +See also
+ +public RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS = 15
+
AlterConsumerGroupOffsets
+ +See also
+ +public RD_KAFKA_RESP_ERR__LOG_TRUNCATION = -139
+
Partition log truncation detected
+ +See also
+ +public RD_KAFKA_EVENT_INCREMENTALALTERCONFIGS_RESULT = 131072
+
IncrementalAlterConfigs_result_t
+ +See also
+ +public RD_KAFKA_EVENT_DESCRIBEUSERSCRAMCREDENTIALS_RESULT = 262144
+
DescribeUserScramCredentials_result_t
+ +See also
+ +public RD_KAFKA_EVENT_ALTERUSERSCRAMCREDENTIALS_RESULT = 524288
+
AlterUserScramCredentials_result_t
+ +See also
+ +public RD_KAFKA_ADMIN_OP_INCREMENTALALTERCONFIGS = 16
+
IncrementalAlterConfigs
+ +See also
+ +public RD_KAFKA_ADMIN_OP_DESCRIBEUSERSCRAMCREDENTIALS = 17
+
DescribeUserScramCredentials
+ +See also
+ +public RD_KAFKA_ADMIN_OP_ALTERUSERSCRAMCREDENTIALS = 18
+
AlterUserScramCredentials
+ +See also
+ +public RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET = 0
+
public RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE = 1
+
public RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND = 2
+
public RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT = 3
+
public RD_KAFKA_ALTER_CONFIG_OP_TYPE__CNT = 4
+
public RD_KAFKA_SCRAM_MECHANISM_UNKNOWN = 0
+
public RD_KAFKA_SCRAM_MECHANISM_SHA_256 = 1
+
public RD_KAFKA_SCRAM_MECHANISM_SHA_512 = 2
+
public RD_KAFKA_SCRAM_MECHANISM__CNT = 3
+
public RD_KAFKA_EVENT_DESCRIBETOPICS_RESULT = 1048576
+
public RD_KAFKA_EVENT_DESCRIBECLUSTER_RESULT = 2097152
+
public RD_KAFKA_EVENT_LISTOFFSETS_RESULT = 4194304
+
public RD_KAFKA_ADMIN_OP_DESCRIBETOPICS = 19
+
public RD_KAFKA_ADMIN_OP_DESCRIBECLUSTER = 20
+
public RD_KAFKA_ADMIN_OP_LISTOFFSETS = 21
+
public RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED = 0
+
public RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED = 1
+
public RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP = -3
+
public RD_KAFKA_OFFSET_SPEC_EARLIEST = -2
+
public RD_KAFKA_OFFSET_SPEC_LATEST = -1
+
public RD_KAFKA_SUPPORTED_METHODS = ['rd_kafka_version' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_version_str' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_get_debug_contexts' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_get_err_descs' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_err2str' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_err2name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_last_error' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_errno2err' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_errno' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_fatal_error' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_test_fatal_error' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_add' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_add_range' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_del' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_del_by_idx' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_copy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_set_offset' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_find' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_list_sort' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_headers_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_headers_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_headers_copy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_header_add' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_header_remove' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_header_get_last' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_header_get' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_header_get_all' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_timestamp' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_latency' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_headers' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_detach_headers' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_set_headers' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_header_cnt' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_message_status' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_dup' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_dup_filter' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_events' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_background_event_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_dr_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_dr_msg_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_consume_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_rebalance_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_offset_commit_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_error_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_throttle_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_log_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_stats_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_socket_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_connect_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_closesocket_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_opaque' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_opaque' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_default_topic_conf' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_get' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_get' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_dump' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_dump' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_dump_free' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_properties_show' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_dup' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_default_topic_conf_dup' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_set' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_set_opaque' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_set_partitioner_cb' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_conf_set_msg_order_cmp' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_available' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_random' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_consistent' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_consistent_random' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_murmur2' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_murmur2_random' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_destroy_flags' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_type' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_memberid' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_clusterid' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_controllerid' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_opaque' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_poll' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_yield' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_pause_partitions' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_resume_partitions' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_query_watermark_offsets' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_get_watermark_offsets' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_offsets_for_times' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_mem_free' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_get_main' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_get_consumer' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_get_partition' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_get_background' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_forward' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_set_log_queue' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_length' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_io_event_enable' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_cb_event_enable' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_start' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_start_queue' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_stop' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_seek' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_batch' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_callback' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_queue' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_batch_queue' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consume_callback_queue' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_offset_store' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_offsets_store' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_subscribe' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_unsubscribe' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_subscription' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consumer_poll' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_consumer_close' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_assign' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_assignment' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_commit' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_commit_message' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_commit_queue' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_committed' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_position' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_produce' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_producev' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_produce_batch' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_flush' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_purge' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_metadata' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_metadata_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_list_groups' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_group_list_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_brokers_add' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_set_logger' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_set_log_level' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_log_print' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_log_syslog' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_outq_len' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_dump' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_thread_cnt' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_wait_destroyed' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_unittest' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_poll_set_consumer' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_type' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_message_next' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_message_array' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_message_count' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_error' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_error_string' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_error_is_fatal' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_opaque' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_log' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_stats' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_topic_partition_list' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_topic_partition' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_CreateTopics_result' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_DeleteTopics_result' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_CreatePartitions_result' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_AlterConfigs_result' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_event_DescribeConfigs_result' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_poll' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_queue_poll_callback' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_plugin_f_conf_init_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_conf_set_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_conf_dup_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_conf_destroy_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_new_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_destroy_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_send_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_acknowledgement_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_consume_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_commit_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_request_sent_t' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_interceptor_add_on_conf_set' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_interceptor_add_on_conf_dup' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_interceptor_add_on_conf_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf_interceptor_add_on_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_send' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_acknowledgement' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_consume' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_commit' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_request_sent' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_result_error' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_result_error_string' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_result_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_request_timeout' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_operation_timeout' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_validate_only' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_broker' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_opaque' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewTopic_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewTopic_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewTopic_destroy_array' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewTopic_set_replica_assignment' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewTopic_set_config' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_CreateTopics' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_CreateTopics_result_topics' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DeleteTopic_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DeleteTopic_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DeleteTopic_destroy_array' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DeleteTopics' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DeleteTopics_result_topics' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewPartitions_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewPartitions_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewPartitions_destroy_array' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_NewPartitions_set_replica_assignment' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_CreatePartitions' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_CreatePartitions_result_topics' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigSource_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_value' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_source' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_is_read_only' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_is_default' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_is_sensitive' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_is_synonym' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigEntry_synonyms' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ResourceType_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_new' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_destroy' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_destroy_array' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_set_config' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_configs' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_type' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_name' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_error' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_error_string' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConfigs' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConfigs_result_resources' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DescribeConfigs' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_DescribeConfigs_result_resources' => ['min' => '1.0.0', 'max' => '2.3.0'], 'rd_kafka_conf' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_oauthbearer_token_refresh_cb' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_ssl_cert_verify_cb' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_ssl_cert' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_event_config_string' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_oauthbearer_set_token' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_oauthbearer_set_token_failure' => ['min' => '1.1.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_thread_start_t' => ['min' => '1.2.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_thread_exit_t' => ['min' => '1.2.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_thread_start' => ['min' => '1.2.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_thread_exit' => ['min' => '1.2.0', 'max' => '2.3.0'], 'rd_kafka_mock_cluster_new' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_cluster_destroy' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_cluster_handle' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_cluster_bootstraps' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_push_request_errors' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_topic_set_error' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_partition_set_leader' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_partition_set_follower' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_partition_set_follower_wmarks' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_set_rack' => ['min' => '1.3.0', 'max' => '2.3.0'], 'rd_kafka_error_code' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_name' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_string' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_is_fatal' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_is_retriable' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_txn_requires_abort' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_destroy' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_error_new' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_fnv1a' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_msg_partitioner_fnv1a_random' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_metadata' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_metadata_new' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_metadata_destroy' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_metadata_write' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_metadata_read' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_init_transactions' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_begin_transaction' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_send_offsets_to_transaction' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_commit_transaction' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_abort_transaction' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_handle_mock_cluster' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_mock_topic_create' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_set_down' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_set_up' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_mock_coordinator_set' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_mock_set_apiversion' => ['min' => '1.4.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_set_rtt' => ['min' => '1.4.4', 'max' => '2.3.0'], 'rd_kafka_message_errstr' => ['min' => '1.5.0', 'max' => '2.3.0'], 'rd_kafka_message_broker_id' => ['min' => '1.5.0', 'max' => '2.3.0'], 'rd_kafka_produceva' => ['min' => '1.5.0', 'max' => '2.3.0'], 'rd_kafka_event_debug_contexts' => ['min' => '1.5.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_push_request_errors' => ['min' => '1.5.0', 'max' => '1.6.2'], 'rd_kafka_conf_get_default_topic_conf' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_queue_yield' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_seek_partitions' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_incremental_assign' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_incremental_unassign' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_rebalance_protocol' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_assignment_lost' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_metadata_new_with_genid' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_event_DeleteRecords_result' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_event_DeleteGroups_result' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_event_DeleteConsumerGroupOffsets_result' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_group_result_error' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_group_result_name' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_group_result_partitions' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteRecords_new' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteRecords_destroy' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteRecords_destroy_array' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteRecords' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteRecords_result_offsets' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteGroup_new' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteGroup_destroy' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteGroup_destroy_array' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteGroups' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteGroups_result_groups' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteConsumerGroupOffsets_new' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteConsumerGroupOffsets_destroy' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteConsumerGroupOffsets_destroy_array' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteConsumerGroupOffsets' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_DeleteConsumerGroupOffsets_result_groups' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_mock_clear_request_errors' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_mock_push_request_errors_array' => ['min' => '1.6.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_response_received_t' => ['min' => '1.6.1', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_response_received' => ['min' => '1.6.1', 'max' => '2.3.0'], 'rd_kafka_conf_set_engine_callback_data' => ['min' => '1.7.0', 'max' => '2.3.0'], 'rd_kafka_mem_calloc' => ['min' => '1.7.0', 'max' => '2.3.0'], 'rd_kafka_mem_malloc' => ['min' => '1.7.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_push_request_error_rtts' => ['min' => '1.7.0', 'max' => '2.3.0'], 'rd_kafka_conf_enable_sasl_queue' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_queue_get_sasl' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_sasl_background_callbacks_enable' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_consumer_close_queue' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_consumer_closed' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_event_CreateAcls_result' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_event_DescribeAcls_result' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_event_DeleteAcls_result' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_ResourcePatternType_name' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_acl_result_error' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclOperation_name' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclPermissionType_name' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_new' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBindingFilter_new' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_restype' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_name' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_principal' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_host' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_operation' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_permission_type' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_resource_pattern_type' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_error' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_destroy' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_AclBinding_destroy_array' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_CreateAcls_result_acls' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_CreateAcls' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_DescribeAcls_result_acls' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_DescribeAcls' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_DeleteAcls_result_responses' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_DeleteAcls_result_response_error' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_DeleteAcls_result_response_matching_acls' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_DeleteAcls' => ['min' => '1.9.0', 'max' => '2.3.0'], 'rd_kafka_conf_set_resolve_cb' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_sasl_set_credentials' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_Node_id' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_Node_host' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_Node_port' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_state_name' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_consumer_group_state_code' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_event_ListConsumerGroups_result' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_event_DescribeConsumerGroups_result' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_event_AlterConsumerGroupOffsets_result' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_event_ListConsumerGroupOffsets_result' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_f_on_broker_state_change_t' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_interceptor_add_on_broker_state_change' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_require_stable_offsets' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_match_consumer_group_states' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroups' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupListing_group_id' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupListing_is_simple_consumer_group' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupListing_state' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroups_result_valid' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroups_result_errors' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_DescribeConsumerGroups' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_DescribeConsumerGroups_result_groups' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_group_id' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_error' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_is_simple_consumer_group' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_partition_assignor' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_state' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_coordinator' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_member_count' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_member' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_MemberDescription_client_id' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_MemberDescription_group_instance_id' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_MemberDescription_consumer_id' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_MemberDescription_host' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_MemberDescription_assignment' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_MemberAssignment_partitions' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroupOffsets_new' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroupOffsets_destroy' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroupOffsets_destroy_array' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroupOffsets' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_ListConsumerGroupOffsets_result_groups' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConsumerGroupOffsets_new' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConsumerGroupOffsets_destroy' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConsumerGroupOffsets_destroy_array' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConsumerGroupOffsets' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_AlterConsumerGroupOffsets_result_groups' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_mock_broker_error_stack_cnt' => ['min' => '2.0.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_set_leader_epoch' => ['min' => '2.1.0', 'max' => '2.3.0'], 'rd_kafka_topic_partition_get_leader_epoch' => ['min' => '2.1.0', 'max' => '2.3.0'], 'rd_kafka_message_leader_epoch' => ['min' => '2.1.0', 'max' => '2.3.0'], 'rd_kafka_offset_store_message' => ['min' => '2.1.0', 'max' => '2.3.0'], 'rd_kafka_event_IncrementalAlterConfigs_result' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_event_DescribeUserScramCredentials_result' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_event_AlterUserScramCredentials_result' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_ConfigResource_add_incremental_config' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_IncrementalAlterConfigs' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_IncrementalAlterConfigs_result_resources' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_ScramCredentialInfo_mechanism' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_ScramCredentialInfo_iterations' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialsDescription_user' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialsDescription_error' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialsDescription_scramcredentialinfo_count' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialsDescription_scramcredentialinfo' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_DescribeUserScramCredentials_result_descriptions' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_DescribeUserScramCredentials' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialUpsertion_new' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialDeletion_new' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialAlteration_destroy' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_UserScramCredentialAlteration_destroy_array' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_AlterUserScramCredentials_result_response_user' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_AlterUserScramCredentials_result_response_error' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_AlterUserScramCredentials_result_responses' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_AlterUserScramCredentials' => ['min' => '2.2.0', 'max' => '2.3.0'], 'rd_kafka_Uuid_base64str' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_Uuid_least_significant_bits' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_Uuid_most_significant_bits' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_Uuid_new' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_Uuid_copy' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_Uuid_destroy' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_Node_rack' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_event_DescribeTopics_result' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_event_DescribeCluster_result' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_event_ListOffsets_result' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_include_authorized_operations' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_AdminOptions_set_isolation_level' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicCollection_of_topic_names' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicCollection_destroy' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeTopics' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeTopics_result_topics' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicDescription_partitions' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicPartitionInfo_partition' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicPartitionInfo_leader' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicPartitionInfo_isr' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicPartitionInfo_replicas' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicDescription_authorized_operations' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicDescription_name' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicDescription_topic_id' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicDescription_is_internal' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_TopicDescription_error' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeCluster' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeCluster_result_nodes' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeCluster_result_authorized_operations' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeCluster_result_controller' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_DescribeCluster_result_cluster_id' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_ConsumerGroupDescription_authorized_operations' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_ListOffsetsResultInfo_topic_partition' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_ListOffsetsResultInfo_timestamp' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_ListOffsets_result_infos' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_ListOffsets' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_start_request_tracking' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_stop_request_tracking' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_request_destroy' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_request_id' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_request_api_key' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_request_timestamp' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_get_requests' => ['min' => '2.3.0', 'max' => '2.3.0'], 'rd_kafka_mock_clear_requests' => ['min' => '2.3.0', 'max' => '2.3.0']]
+
public RD_KAFKA_VERSION = 16777471
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 74
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 75
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 74,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *opaque), void *opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *opaque), void *opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque), void *opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque), void *opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque), void *opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+'
+
public RD_KAFKA_VERSION = 16777727
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 82
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *opaque), void *opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *opaque), void *opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque), void *opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque), void *opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque), void *opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+'
+
public RD_KAFKA_VERSION = 16843007
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 82
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *opaque), void *opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *opaque), void *opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque), void *opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque), void *opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque), void *opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+'
+
public RD_KAFKA_VERSION = 16908543
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 82
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+'
+
public RD_KAFKA_VERSION = 16908799
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 82
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+'
+
public RD_KAFKA_VERSION = 16909055
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 82
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+'
+
public RD_KAFKA_VERSION = 16974079
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 82
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+'
+
public RD_KAFKA_VERSION = 17039615
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 83
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17040127
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 83
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17040639
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 83
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17105151
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 83
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17105663
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 89
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17105919
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 89
+
public RD_KAFKA_ADMIN_OP__CNT = 6
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17170687
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 9
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17170943
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 9
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17171199
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 9
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17236223
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 9
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17301759
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 9
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17302271
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 9
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17367295
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 12
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17367551
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 12
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 17367807
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 12
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33554687
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 16
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33554687
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 16
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33555199
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 16
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33620223
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 16
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__LOG_TRUNCATION = (- 139),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+void rd_kafka_topic_partition_set_leader_epoch(rd_kafka_topic_partition_t *rktpar, int32_t leader_epoch);
+int32_t rd_kafka_topic_partition_get_leader_epoch(const rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_leader_epoch(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_error_t *rd_kafka_offset_store_message(rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33620479
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 16
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__LOG_TRUNCATION = (- 139),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+void rd_kafka_topic_partition_set_leader_epoch(rd_kafka_topic_partition_t *rktpar, int32_t leader_epoch);
+int32_t rd_kafka_topic_partition_get_leader_epoch(const rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_leader_epoch(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_error_t *rd_kafka_offset_store_message(rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33685759
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 19
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__LOG_TRUNCATION = (- 139),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+void rd_kafka_topic_partition_set_leader_epoch(rd_kafka_topic_partition_t *rktpar, int32_t leader_epoch);
+int32_t rd_kafka_topic_partition_get_leader_epoch(const rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_leader_epoch(const rd_kafka_message_t *rkmessage);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_error_t *rd_kafka_offset_store_message(rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_IncrementalAlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeUserScramCredentials_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterUserScramCredentials_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_IncrementalAlterConfigs_result_t *rd_kafka_event_IncrementalAlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeUserScramCredentials_result_t *rd_kafka_event_DescribeUserScramCredentials_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterUserScramCredentials_result_t *rd_kafka_event_AlterUserScramCredentials_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_INCREMENTALALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEUSERSCRAMCREDENTIALS,
+ RD_KAFKA_ADMIN_OP_ALTERUSERSCRAMCREDENTIALS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+typedef enum rd_kafka_AlterConfigOpType_t {
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET = 0,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE = 1,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND = 2,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT = 3,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE__CNT,
+} rd_kafka_AlterConfigOpType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+rd_kafka_error_t *rd_kafka_ConfigResource_add_incremental_config(rd_kafka_ConfigResource_t *config, const char *name, rd_kafka_AlterConfigOpType_t op_type, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_IncrementalAlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_IncrementalAlterConfigs_result_resources(const rd_kafka_IncrementalAlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ScramMechanism_t {
+ RD_KAFKA_SCRAM_MECHANISM_UNKNOWN = 0,
+ RD_KAFKA_SCRAM_MECHANISM_SHA_256 = 1,
+ RD_KAFKA_SCRAM_MECHANISM_SHA_512 = 2,
+ RD_KAFKA_SCRAM_MECHANISM__CNT,
+} rd_kafka_ScramMechanism_t;
+typedef struct rd_kafka_ScramCredentialInfo_s rd_kafka_ScramCredentialInfo_t;
+rd_kafka_ScramMechanism_t rd_kafka_ScramCredentialInfo_mechanism(const rd_kafka_ScramCredentialInfo_t *scram_credential_info);
+int32_t rd_kafka_ScramCredentialInfo_iterations(const rd_kafka_ScramCredentialInfo_t *scram_credential_info);
+typedef struct rd_kafka_UserScramCredentialsDescription_s rd_kafka_UserScramCredentialsDescription_t;
+const char *rd_kafka_UserScramCredentialsDescription_user(const rd_kafka_UserScramCredentialsDescription_t *description);
+const rd_kafka_error_t *rd_kafka_UserScramCredentialsDescription_error(const rd_kafka_UserScramCredentialsDescription_t *description);
+size_t rd_kafka_UserScramCredentialsDescription_scramcredentialinfo_count(const rd_kafka_UserScramCredentialsDescription_t *description);
+const rd_kafka_ScramCredentialInfo_t *rd_kafka_UserScramCredentialsDescription_scramcredentialinfo(const rd_kafka_UserScramCredentialsDescription_t *description, size_t idx);
+const rd_kafka_UserScramCredentialsDescription_t **rd_kafka_DescribeUserScramCredentials_result_descriptions(const rd_kafka_DescribeUserScramCredentials_result_t *result, size_t *cntp);
+void rd_kafka_DescribeUserScramCredentials(rd_kafka_t *rk, const char **users, size_t user_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_UserScramCredentialAlteration_s rd_kafka_UserScramCredentialAlteration_t;
+rd_kafka_UserScramCredentialAlteration_t *rd_kafka_UserScramCredentialUpsertion_new(const char *username, rd_kafka_ScramMechanism_t mechanism, int32_t iterations, const unsigned char *password, size_t password_size, const unsigned char *salt, size_t salt_size);
+rd_kafka_UserScramCredentialAlteration_t *rd_kafka_UserScramCredentialDeletion_new(const char *username, rd_kafka_ScramMechanism_t mechanism);
+void rd_kafka_UserScramCredentialAlteration_destroy(rd_kafka_UserScramCredentialAlteration_t *alteration);
+void rd_kafka_UserScramCredentialAlteration_destroy_array(rd_kafka_UserScramCredentialAlteration_t **alterations, size_t alteration_cnt);
+typedef struct rd_kafka_AlterUserScramCredentials_result_response_s rd_kafka_AlterUserScramCredentials_result_response_t;
+const char *rd_kafka_AlterUserScramCredentials_result_response_user(const rd_kafka_AlterUserScramCredentials_result_response_t *response);
+const rd_kafka_error_t *rd_kafka_AlterUserScramCredentials_result_response_error(const rd_kafka_AlterUserScramCredentials_result_response_t *response);
+const rd_kafka_AlterUserScramCredentials_result_response_t **rd_kafka_AlterUserScramCredentials_result_responses(const rd_kafka_AlterUserScramCredentials_result_t *result, size_t *cntp);
+void rd_kafka_AlterUserScramCredentials(rd_kafka_t *rk, rd_kafka_UserScramCredentialAlteration_t **alterations, size_t alteration_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+'
+
public RD_KAFKA_VERSION = 33751295
+
librdkafka version
+Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
See also
+ +public RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76
+
Unsupported compression type
+ +See also
+ +public RD_KAFKA_RESP_ERR_END_ALL = 98
+
public RD_KAFKA_ADMIN_OP__CNT = 22
+
Number of ops defined
+ +See also
+ +public RD_KAFKA_CDEF = 'typedef long int ssize_t;
+typedef struct _IO_FILE FILE;
+typedef long int mode_t;
+typedef signed int int16_t;
+typedef unsigned int uint16_t;
+typedef signed int int32_t;
+typedef signed long int int64_t;
+int rd_kafka_version(void);
+const char *rd_kafka_version_str(void);
+typedef enum rd_kafka_type_t {
+ RD_KAFKA_PRODUCER,
+ RD_KAFKA_CONSUMER,
+} rd_kafka_type_t;
+typedef enum rd_kafka_timestamp_type_t {
+ RD_KAFKA_TIMESTAMP_NOT_AVAILABLE,
+ RD_KAFKA_TIMESTAMP_CREATE_TIME,
+ RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME,
+} rd_kafka_timestamp_type_t;
+const char *rd_kafka_get_debug_contexts(void);
+typedef struct rd_kafka_s rd_kafka_t;
+typedef struct rd_kafka_topic_s rd_kafka_topic_t;
+typedef struct rd_kafka_conf_s rd_kafka_conf_t;
+typedef struct rd_kafka_topic_conf_s rd_kafka_topic_conf_t;
+typedef struct rd_kafka_queue_s rd_kafka_queue_t;
+typedef struct rd_kafka_op_s rd_kafka_event_t;
+typedef struct rd_kafka_topic_result_s rd_kafka_topic_result_t;
+typedef struct rd_kafka_consumer_group_metadata_s rd_kafka_consumer_group_metadata_t;
+typedef struct rd_kafka_error_s {
+ unsigned int code;
+ char *errstr;
+ unsigned char fatal;
+ unsigned char retriable;
+ unsigned char txn_requires_abort;
+} rd_kafka_error_t;
+typedef struct rd_kafka_headers_s rd_kafka_headers_t;
+typedef struct rd_kafka_group_result_s rd_kafka_group_result_t;
+typedef struct rd_kafka_acl_result_s rd_kafka_acl_result_t;
+typedef struct rd_kafka_Uuid_s rd_kafka_Uuid_t;
+typedef enum {
+ RD_KAFKA_RESP_ERR__BEGIN = (- 200),
+ RD_KAFKA_RESP_ERR__BAD_MSG = (- 199),
+ RD_KAFKA_RESP_ERR__BAD_COMPRESSION = (- 198),
+ RD_KAFKA_RESP_ERR__DESTROY = (- 197),
+ RD_KAFKA_RESP_ERR__FAIL = (- 196),
+ RD_KAFKA_RESP_ERR__TRANSPORT = (- 195),
+ RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = (- 194),
+ RD_KAFKA_RESP_ERR__RESOLVE = (- 193),
+ RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = (- 192),
+ RD_KAFKA_RESP_ERR__PARTITION_EOF = (- 191),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = (- 190),
+ RD_KAFKA_RESP_ERR__FS = (- 189),
+ RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = (- 188),
+ RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = (- 187),
+ RD_KAFKA_RESP_ERR__INVALID_ARG = (- 186),
+ RD_KAFKA_RESP_ERR__TIMED_OUT = (- 185),
+ RD_KAFKA_RESP_ERR__QUEUE_FULL = (- 184),
+ RD_KAFKA_RESP_ERR__ISR_INSUFF = (- 183),
+ RD_KAFKA_RESP_ERR__NODE_UPDATE = (- 182),
+ RD_KAFKA_RESP_ERR__SSL = (- 181),
+ RD_KAFKA_RESP_ERR__WAIT_COORD = (- 180),
+ RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = (- 179),
+ RD_KAFKA_RESP_ERR__IN_PROGRESS = (- 178),
+ RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = (- 177),
+ RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = (- 176),
+ RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = (- 175),
+ RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = (- 174),
+ RD_KAFKA_RESP_ERR__CONFLICT = (- 173),
+ RD_KAFKA_RESP_ERR__STATE = (- 172),
+ RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = (- 171),
+ RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = (- 170),
+ RD_KAFKA_RESP_ERR__AUTHENTICATION = (- 169),
+ RD_KAFKA_RESP_ERR__NO_OFFSET = (- 168),
+ RD_KAFKA_RESP_ERR__OUTDATED = (- 167),
+ RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = (- 166),
+ RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = (- 165),
+ RD_KAFKA_RESP_ERR__WAIT_CACHE = (- 164),
+ RD_KAFKA_RESP_ERR__INTR = (- 163),
+ RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = (- 162),
+ RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = (- 161),
+ RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = (- 160),
+ RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = (- 159),
+ RD_KAFKA_RESP_ERR__PARTIAL = (- 158),
+ RD_KAFKA_RESP_ERR__READ_ONLY = (- 157),
+ RD_KAFKA_RESP_ERR__NOENT = (- 156),
+ RD_KAFKA_RESP_ERR__UNDERFLOW = (- 155),
+ RD_KAFKA_RESP_ERR__INVALID_TYPE = (- 154),
+ RD_KAFKA_RESP_ERR__RETRY = (- 153),
+ RD_KAFKA_RESP_ERR__PURGE_QUEUE = (- 152),
+ RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = (- 151),
+ RD_KAFKA_RESP_ERR__FATAL = (- 150),
+ RD_KAFKA_RESP_ERR__INCONSISTENT = (- 149),
+ RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = (- 148),
+ RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = (- 147),
+ RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = (- 146),
+ RD_KAFKA_RESP_ERR__NOT_CONFIGURED = (- 145),
+ RD_KAFKA_RESP_ERR__FENCED = (- 144),
+ RD_KAFKA_RESP_ERR__APPLICATION = (- 143),
+ RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = (- 142),
+ RD_KAFKA_RESP_ERR__NOOP = (- 141),
+ RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = (- 140),
+ RD_KAFKA_RESP_ERR__LOG_TRUNCATION = (- 139),
+ RD_KAFKA_RESP_ERR__END = (- 100),
+ RD_KAFKA_RESP_ERR_UNKNOWN = (- 1),
+ RD_KAFKA_RESP_ERR_NO_ERROR = 0,
+ RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
+ RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
+ RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
+ RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
+ RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
+ RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
+ RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
+ RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
+ RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
+ RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
+ RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
+ RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
+ RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
+ RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
+ RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
+ RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
+ RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
+ RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
+ RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
+ RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
+ RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
+ RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
+ RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
+ RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
+ RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
+ RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
+ RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
+ RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
+ RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
+ RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
+ RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
+ RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
+ RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
+ RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
+ RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
+ RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
+ RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
+ RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
+ RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
+ RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
+ RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
+ RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
+ RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
+ RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
+ RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
+ RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
+ RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
+ RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
+ RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
+ RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
+ RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
+ RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
+ RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
+ RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
+ RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
+ RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
+ RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
+ RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
+ RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
+ RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
+ RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
+ RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
+ RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
+ RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
+ RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
+ RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
+ RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
+ RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
+ RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
+ RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
+ RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83,
+ RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84,
+ RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85,
+ RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86,
+ RD_KAFKA_RESP_ERR_INVALID_RECORD = 87,
+ RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88,
+ RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED = 89,
+ RD_KAFKA_RESP_ERR_PRODUCER_FENCED = 90,
+ RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND = 91,
+ RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE = 92,
+ RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL = 93,
+ RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET = 94,
+ RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
+ RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
+ RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
+ RD_KAFKA_RESP_ERR_END_ALL,
+} rd_kafka_resp_err_t;
+struct rd_kafka_err_desc {
+ rd_kafka_resp_err_t code;
+ char *name;
+ char *desc;
+};
+void rd_kafka_get_err_descs(const struct rd_kafka_err_desc **errdescs, size_t *cntp);
+const char *rd_kafka_err2str(rd_kafka_resp_err_t err);
+const char *rd_kafka_err2name(rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_last_error(void);
+rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
+int rd_kafka_errno(void);
+rd_kafka_resp_err_t rd_kafka_fatal_error(rd_kafka_t *rk, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_test_fatal_error(rd_kafka_t *rk, rd_kafka_resp_err_t err, const char *reason);
+rd_kafka_resp_err_t rd_kafka_error_code(const rd_kafka_error_t *error);
+const char *rd_kafka_error_name(const rd_kafka_error_t *error);
+const char *rd_kafka_error_string(const rd_kafka_error_t *error);
+int rd_kafka_error_is_fatal(const rd_kafka_error_t *error);
+int rd_kafka_error_is_retriable(const rd_kafka_error_t *error);
+int rd_kafka_error_txn_requires_abort(const rd_kafka_error_t *error);
+void rd_kafka_error_destroy(rd_kafka_error_t *error);
+rd_kafka_error_t *rd_kafka_error_new(rd_kafka_resp_err_t code, const char *fmt, ...);
+typedef struct rd_kafka_topic_partition_s {
+ char *topic;
+ int32_t partition;
+ int64_t offset;
+ void *metadata;
+ size_t metadata_size;
+ void *opaque;
+ rd_kafka_resp_err_t err;
+ void *_private;
+} rd_kafka_topic_partition_t;
+void rd_kafka_topic_partition_destroy(rd_kafka_topic_partition_t *rktpar);
+void rd_kafka_topic_partition_set_leader_epoch(rd_kafka_topic_partition_t *rktpar, int32_t leader_epoch);
+int32_t rd_kafka_topic_partition_get_leader_epoch(const rd_kafka_topic_partition_t *rktpar);
+typedef struct rd_kafka_topic_partition_list_s {
+ int cnt;
+ int size;
+ rd_kafka_topic_partition_t *elems;
+} rd_kafka_topic_partition_list_t;
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_new(int size);
+void rd_kafka_topic_partition_list_destroy(rd_kafka_topic_partition_list_t *rkparlist);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_add(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_add_range(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t start, int32_t stop);
+int rd_kafka_topic_partition_list_del(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+int rd_kafka_topic_partition_list_del_by_idx(rd_kafka_topic_partition_list_t *rktparlist, int idx);
+rd_kafka_topic_partition_list_t *rd_kafka_topic_partition_list_copy(const rd_kafka_topic_partition_list_t *src);
+rd_kafka_resp_err_t rd_kafka_topic_partition_list_set_offset(rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition, int64_t offset);
+rd_kafka_topic_partition_t *rd_kafka_topic_partition_list_find(const rd_kafka_topic_partition_list_t *rktparlist, const char *topic, int32_t partition);
+void rd_kafka_topic_partition_list_sort(rd_kafka_topic_partition_list_t *rktparlist, int (*cmp)(const void *a, const void *b, void *cmp_opaque), void *cmp_opaque);
+typedef enum rd_kafka_vtype_t {
+ RD_KAFKA_VTYPE_END,
+ RD_KAFKA_VTYPE_TOPIC,
+ RD_KAFKA_VTYPE_RKT,
+ RD_KAFKA_VTYPE_PARTITION,
+ RD_KAFKA_VTYPE_VALUE,
+ RD_KAFKA_VTYPE_KEY,
+ RD_KAFKA_VTYPE_OPAQUE,
+ RD_KAFKA_VTYPE_MSGFLAGS,
+ RD_KAFKA_VTYPE_TIMESTAMP,
+ RD_KAFKA_VTYPE_HEADER,
+ RD_KAFKA_VTYPE_HEADERS,
+} rd_kafka_vtype_t;
+typedef struct rd_kafka_vu_s {
+ rd_kafka_vtype_t vtype;
+ union {
+ char *cstr;
+ rd_kafka_topic_t *rkt;
+ int i;
+ int32_t i32;
+ int64_t i64;
+ struct {
+ void *ptr;
+ size_t size;
+ } mem;
+ struct {
+ char *name;
+ void *val;
+ ssize_t size;
+ } header;
+ rd_kafka_headers_t *headers;
+ void *ptr;
+ char _pad[64];
+ } u;
+} rd_kafka_vu_t;
+rd_kafka_headers_t *rd_kafka_headers_new(size_t initial_count);
+void rd_kafka_headers_destroy(rd_kafka_headers_t *hdrs);
+rd_kafka_headers_t *rd_kafka_headers_copy(const rd_kafka_headers_t *src);
+rd_kafka_resp_err_t rd_kafka_header_add(rd_kafka_headers_t *hdrs, const char *name, ssize_t name_size, const void *value, ssize_t value_size);
+rd_kafka_resp_err_t rd_kafka_header_remove(rd_kafka_headers_t *hdrs, const char *name);
+rd_kafka_resp_err_t rd_kafka_header_get_last(const rd_kafka_headers_t *hdrs, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get(const rd_kafka_headers_t *hdrs, size_t idx, const char *name, const void **valuep, size_t *sizep);
+rd_kafka_resp_err_t rd_kafka_header_get_all(const rd_kafka_headers_t *hdrs, size_t idx, const char **namep, const void **valuep, size_t *sizep);
+typedef struct rd_kafka_message_s {
+ rd_kafka_resp_err_t err;
+ rd_kafka_topic_t *rkt;
+ int32_t partition;
+ void *payload;
+ size_t len;
+ void *key;
+ size_t key_len;
+ int64_t offset;
+ void *_private;
+} rd_kafka_message_t;
+void rd_kafka_message_destroy(rd_kafka_message_t *rkmessage);
+const char *rd_kafka_message_errstr(const rd_kafka_message_t *rkmessage);
+int64_t rd_kafka_message_timestamp(const rd_kafka_message_t *rkmessage, rd_kafka_timestamp_type_t *tstype);
+int64_t rd_kafka_message_latency(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_broker_id(const rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_message_headers(const rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+rd_kafka_resp_err_t rd_kafka_message_detach_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t **hdrsp);
+void rd_kafka_message_set_headers(rd_kafka_message_t *rkmessage, rd_kafka_headers_t *hdrs);
+size_t rd_kafka_header_cnt(const rd_kafka_headers_t *hdrs);
+typedef enum {
+ RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
+ RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
+ RD_KAFKA_MSG_STATUS_PERSISTED = 2,
+} rd_kafka_msg_status_t;
+rd_kafka_msg_status_t rd_kafka_message_status(const rd_kafka_message_t *rkmessage);
+int32_t rd_kafka_message_leader_epoch(const rd_kafka_message_t *rkmessage);
+const char *rd_kafka_Uuid_base64str(const rd_kafka_Uuid_t *uuid);
+int64_t rd_kafka_Uuid_least_significant_bits(const rd_kafka_Uuid_t *uuid);
+int64_t rd_kafka_Uuid_most_significant_bits(const rd_kafka_Uuid_t *uuid);
+rd_kafka_Uuid_t *rd_kafka_Uuid_new(int64_t most_significant_bits, int64_t least_significant_bits);
+rd_kafka_Uuid_t *rd_kafka_Uuid_copy(const rd_kafka_Uuid_t *uuid);
+void rd_kafka_Uuid_destroy(rd_kafka_Uuid_t *uuid);
+typedef enum {
+ RD_KAFKA_CONF_UNKNOWN = (- 2),
+ RD_KAFKA_CONF_INVALID = (- 1),
+ RD_KAFKA_CONF_OK = 0,
+} rd_kafka_conf_res_t;
+rd_kafka_conf_t *rd_kafka_conf_new(void);
+void rd_kafka_conf_destroy(rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup(const rd_kafka_conf_t *conf);
+rd_kafka_conf_t *rd_kafka_conf_dup_filter(const rd_kafka_conf_t *conf, size_t filter_cnt, const char **filter);
+const rd_kafka_conf_t *rd_kafka_conf(rd_kafka_t *rk);
+rd_kafka_conf_res_t rd_kafka_conf_set(rd_kafka_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_events(rd_kafka_conf_t *conf, int events);
+void rd_kafka_conf_set_background_event_cb(rd_kafka_conf_t *conf, void (*event_cb)(rd_kafka_t *rk, rd_kafka_event_t *rkev, void *opaque));
+void rd_kafka_conf_set_dr_cb(rd_kafka_conf_t *conf, void (*dr_cb)(rd_kafka_t *rk, void *payload, size_t len, rd_kafka_resp_err_t err, void *opaque, void *msg_opaque));
+void rd_kafka_conf_set_dr_msg_cb(rd_kafka_conf_t *conf, void (*dr_msg_cb)(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_consume_cb(rd_kafka_conf_t *conf, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *opaque));
+void rd_kafka_conf_set_rebalance_cb(rd_kafka_conf_t *conf, void (*rebalance_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *partitions, void *opaque));
+void rd_kafka_conf_set_offset_commit_cb(rd_kafka_conf_t *conf, void (*offset_commit_cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *opaque));
+void rd_kafka_conf_set_error_cb(rd_kafka_conf_t *conf, void (*error_cb)(rd_kafka_t *rk, int err, const char *reason, void *opaque));
+void rd_kafka_conf_set_throttle_cb(rd_kafka_conf_t *conf, void (*throttle_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int throttle_time_ms, void *opaque));
+void rd_kafka_conf_set_log_cb(rd_kafka_conf_t *conf, void (*log_cb)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_conf_set_stats_cb(rd_kafka_conf_t *conf, int (*stats_cb)(rd_kafka_t *rk, char *json, size_t json_len, void *opaque));
+void rd_kafka_conf_set_oauthbearer_token_refresh_cb(rd_kafka_conf_t *conf, void (*oauthbearer_token_refresh_cb)(rd_kafka_t *rk, const char *oauthbearer_config, void *opaque));
+void rd_kafka_conf_enable_sasl_queue(rd_kafka_conf_t *conf, int enable);
+void rd_kafka_conf_set_socket_cb(rd_kafka_conf_t *conf, int (*socket_cb)(int domain, int type, int protocol, void *opaque));
+void rd_kafka_conf_set_connect_cb(rd_kafka_conf_t *conf, int (*connect_cb)(int sockfd, const struct sockaddr *addr, int addrlen, const char *id, void *opaque));
+void rd_kafka_conf_set_closesocket_cb(rd_kafka_conf_t *conf, int (*closesocket_cb)(int sockfd, void *opaque));
+struct addrinfo;
+void rd_kafka_conf_set_resolve_cb(rd_kafka_conf_t *conf, int (*resolve_cb)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res, void *opaque));
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert_verify_cb(rd_kafka_conf_t *conf, int (*ssl_cert_verify_cb)(rd_kafka_t *rk, const char *broker_name, int32_t broker_id, int *x509_error, int depth, const char *buf, size_t size, char *errstr, size_t errstr_size, void *opaque));
+typedef enum rd_kafka_cert_type_t {
+ RD_KAFKA_CERT_PUBLIC_KEY,
+ RD_KAFKA_CERT_PRIVATE_KEY,
+ RD_KAFKA_CERT_CA,
+ RD_KAFKA_CERT__CNT,
+} rd_kafka_cert_type_t;
+typedef enum rd_kafka_cert_enc_t {
+ RD_KAFKA_CERT_ENC_PKCS12,
+ RD_KAFKA_CERT_ENC_DER,
+ RD_KAFKA_CERT_ENC_PEM,
+ RD_KAFKA_CERT_ENC__CNT,
+} rd_kafka_cert_enc_t;
+rd_kafka_conf_res_t rd_kafka_conf_set_ssl_cert(rd_kafka_conf_t *conf, rd_kafka_cert_type_t cert_type, rd_kafka_cert_enc_t cert_enc, const void *buffer, size_t size, char *errstr, size_t errstr_size);
+void rd_kafka_conf_set_engine_callback_data(rd_kafka_conf_t *conf, void *callback_data);
+void rd_kafka_conf_set_opaque(rd_kafka_conf_t *conf, void *opaque);
+void *rd_kafka_opaque(const rd_kafka_t *rk);
+void rd_kafka_conf_set_default_topic_conf(rd_kafka_conf_t *conf, rd_kafka_topic_conf_t *tconf);
+rd_kafka_topic_conf_t *rd_kafka_conf_get_default_topic_conf(rd_kafka_conf_t *conf);
+rd_kafka_conf_res_t rd_kafka_conf_get(const rd_kafka_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+rd_kafka_conf_res_t rd_kafka_topic_conf_get(const rd_kafka_topic_conf_t *conf, const char *name, char *dest, size_t *dest_size);
+const char **rd_kafka_conf_dump(rd_kafka_conf_t *conf, size_t *cntp);
+const char **rd_kafka_topic_conf_dump(rd_kafka_topic_conf_t *conf, size_t *cntp);
+void rd_kafka_conf_dump_free(const char **arr, size_t cnt);
+void rd_kafka_conf_properties_show(FILE *fp);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_new(void);
+rd_kafka_topic_conf_t *rd_kafka_topic_conf_dup(const rd_kafka_topic_conf_t *conf);
+rd_kafka_topic_conf_t *rd_kafka_default_topic_conf_dup(rd_kafka_t *rk);
+void rd_kafka_topic_conf_destroy(rd_kafka_topic_conf_t *topic_conf);
+rd_kafka_conf_res_t rd_kafka_topic_conf_set(rd_kafka_topic_conf_t *conf, const char *name, const char *value, char *errstr, size_t errstr_size);
+void rd_kafka_topic_conf_set_opaque(rd_kafka_topic_conf_t *conf, void *rkt_opaque);
+void rd_kafka_topic_conf_set_partitioner_cb(rd_kafka_topic_conf_t *topic_conf, int32_t (*partitioner)(const rd_kafka_topic_t *rkt, const void *keydata, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque));
+void rd_kafka_topic_conf_set_msg_order_cmp(rd_kafka_topic_conf_t *topic_conf, int (*msg_order_cmp)(const rd_kafka_message_t *a, const rd_kafka_message_t *b));
+int rd_kafka_topic_partition_available(const rd_kafka_topic_t *rkt, int32_t partition);
+int32_t rd_kafka_msg_partitioner_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_consistent_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_murmur2_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+int32_t rd_kafka_msg_partitioner_fnv1a_random(const rd_kafka_topic_t *rkt, const void *key, size_t keylen, int32_t partition_cnt, void *rkt_opaque, void *msg_opaque);
+rd_kafka_t *rd_kafka_new(rd_kafka_type_t type, rd_kafka_conf_t *conf, char *errstr, size_t errstr_size);
+void rd_kafka_destroy(rd_kafka_t *rk);
+void rd_kafka_destroy_flags(rd_kafka_t *rk, int flags);
+const char *rd_kafka_name(const rd_kafka_t *rk);
+rd_kafka_type_t rd_kafka_type(const rd_kafka_t *rk);
+char *rd_kafka_memberid(const rd_kafka_t *rk);
+char *rd_kafka_clusterid(rd_kafka_t *rk, int timeout_ms);
+int32_t rd_kafka_controllerid(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_topic_t *rd_kafka_topic_new(rd_kafka_t *rk, const char *topic, rd_kafka_topic_conf_t *conf);
+void rd_kafka_topic_destroy(rd_kafka_topic_t *rkt);
+const char *rd_kafka_topic_name(const rd_kafka_topic_t *rkt);
+void *rd_kafka_topic_opaque(const rd_kafka_topic_t *rkt);
+int rd_kafka_poll(rd_kafka_t *rk, int timeout_ms);
+void rd_kafka_yield(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_pause_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_resume_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_query_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_get_watermark_offsets(rd_kafka_t *rk, const char *topic, int32_t partition, int64_t *low, int64_t *high);
+rd_kafka_resp_err_t rd_kafka_offsets_for_times(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets, int timeout_ms);
+void *rd_kafka_mem_calloc(rd_kafka_t *rk, size_t num, size_t size);
+void *rd_kafka_mem_malloc(rd_kafka_t *rk, size_t size);
+void rd_kafka_mem_free(rd_kafka_t *rk, void *ptr);
+rd_kafka_queue_t *rd_kafka_queue_new(rd_kafka_t *rk);
+void rd_kafka_queue_destroy(rd_kafka_queue_t *rkqu);
+rd_kafka_queue_t *rd_kafka_queue_get_main(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_sasl(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_background_callbacks_enable(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_sasl_set_credentials(rd_kafka_t *rk, const char *username, const char *password);
+rd_kafka_queue_t *rd_kafka_queue_get_consumer(rd_kafka_t *rk);
+rd_kafka_queue_t *rd_kafka_queue_get_partition(rd_kafka_t *rk, const char *topic, int32_t partition);
+rd_kafka_queue_t *rd_kafka_queue_get_background(rd_kafka_t *rk);
+void rd_kafka_queue_forward(rd_kafka_queue_t *src, rd_kafka_queue_t *dst);
+rd_kafka_resp_err_t rd_kafka_set_log_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+size_t rd_kafka_queue_length(rd_kafka_queue_t *rkqu);
+void rd_kafka_queue_io_event_enable(rd_kafka_queue_t *rkqu, int fd, const void *payload, size_t size);
+void rd_kafka_queue_cb_event_enable(rd_kafka_queue_t *rkqu, void (*event_cb)(rd_kafka_t *rk, void *qev_opaque), void *qev_opaque);
+void rd_kafka_queue_yield(rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_start(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+int rd_kafka_consume_start_queue(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, rd_kafka_queue_t *rkqu);
+int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
+rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset, int timeout_ms);
+rd_kafka_error_t *rd_kafka_seek_partitions(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_message_t *rd_kafka_consume(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms);
+ssize_t rd_kafka_consume_batch(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback(rd_kafka_topic_t *rkt, int32_t partition, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_message_t *rd_kafka_consume_queue(rd_kafka_queue_t *rkqu, int timeout_ms);
+ssize_t rd_kafka_consume_batch_queue(rd_kafka_queue_t *rkqu, int timeout_ms, rd_kafka_message_t **rkmessages, size_t rkmessages_size);
+int rd_kafka_consume_callback_queue(rd_kafka_queue_t *rkqu, int timeout_ms, void (*consume_cb)(rd_kafka_message_t *rkmessage, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_offset_store(rd_kafka_topic_t *rkt, int32_t partition, int64_t offset);
+rd_kafka_resp_err_t rd_kafka_offsets_store(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *offsets);
+rd_kafka_error_t *rd_kafka_offset_store_message(rd_kafka_message_t *rkmessage);
+rd_kafka_resp_err_t rd_kafka_subscribe(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *topics);
+rd_kafka_resp_err_t rd_kafka_unsubscribe(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_subscription(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **topics);
+rd_kafka_message_t *rd_kafka_consumer_poll(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_consumer_close(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_consumer_close_queue(rd_kafka_t *rk, rd_kafka_queue_t *rkqu);
+int rd_kafka_consumer_closed(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_incremental_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_error_t *rd_kafka_incremental_unassign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+const char *rd_kafka_rebalance_protocol(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_assign(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_resp_err_t rd_kafka_assignment(rd_kafka_t *rk, rd_kafka_topic_partition_list_t **partitions);
+int rd_kafka_assignment_lost(rd_kafka_t *rk);
+rd_kafka_resp_err_t rd_kafka_commit(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, int async);
+rd_kafka_resp_err_t rd_kafka_commit_message(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage, int async);
+rd_kafka_resp_err_t rd_kafka_commit_queue(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_queue_t *rkqu, void (*cb)(rd_kafka_t *rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t *offsets, void *commit_opaque), void *commit_opaque);
+rd_kafka_resp_err_t rd_kafka_committed(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_position(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *partitions);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata(rd_kafka_t *rk);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new(const char *group_id);
+rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_new_with_genid(const char *group_id, int32_t generation_id, const char *member_id, const char *group_instance_id);
+void rd_kafka_consumer_group_metadata_destroy(rd_kafka_consumer_group_metadata_t *);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_write(const rd_kafka_consumer_group_metadata_t *cgmd, void **bufferp, size_t *sizep);
+rd_kafka_error_t *rd_kafka_consumer_group_metadata_read(rd_kafka_consumer_group_metadata_t **cgmdp, const void *buffer, size_t size);
+int rd_kafka_produce(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t keylen, void *msg_opaque);
+rd_kafka_resp_err_t rd_kafka_producev(rd_kafka_t *rk, ...);
+rd_kafka_error_t *rd_kafka_produceva(rd_kafka_t *rk, const rd_kafka_vu_t *vus, size_t cnt);
+int rd_kafka_produce_batch(rd_kafka_topic_t *rkt, int32_t partition, int msgflags, rd_kafka_message_t *rkmessages, int message_cnt);
+rd_kafka_resp_err_t rd_kafka_flush(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_resp_err_t rd_kafka_purge(rd_kafka_t *rk, int purge_flags);
+typedef struct rd_kafka_metadata_broker {
+ int32_t id;
+ char *host;
+ int port;
+} rd_kafka_metadata_broker_t;
+typedef struct rd_kafka_metadata_partition {
+ int32_t id;
+ rd_kafka_resp_err_t err;
+ int32_t leader;
+ int replica_cnt;
+ int32_t *replicas;
+ int isr_cnt;
+ int32_t *isrs;
+} rd_kafka_metadata_partition_t;
+typedef struct rd_kafka_metadata_topic {
+ char *topic;
+ int partition_cnt;
+ struct rd_kafka_metadata_partition *partitions;
+ rd_kafka_resp_err_t err;
+} rd_kafka_metadata_topic_t;
+typedef struct rd_kafka_metadata {
+ int broker_cnt;
+ struct rd_kafka_metadata_broker *brokers;
+ int topic_cnt;
+ struct rd_kafka_metadata_topic *topics;
+ int32_t orig_broker_id;
+ char *orig_broker_name;
+} rd_kafka_metadata_t;
+rd_kafka_resp_err_t rd_kafka_metadata(rd_kafka_t *rk, int all_topics, rd_kafka_topic_t *only_rkt, const struct rd_kafka_metadata **metadatap, int timeout_ms);
+void rd_kafka_metadata_destroy(const struct rd_kafka_metadata *metadata);
+typedef struct rd_kafka_Node_s rd_kafka_Node_t;
+int rd_kafka_Node_id(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_host(const rd_kafka_Node_t *node);
+uint16_t rd_kafka_Node_port(const rd_kafka_Node_t *node);
+const char *rd_kafka_Node_rack(const rd_kafka_Node_t *node);
+struct rd_kafka_group_member_info {
+ char *member_id;
+ char *client_id;
+ char *client_host;
+ void *member_metadata;
+ int member_metadata_size;
+ void *member_assignment;
+ int member_assignment_size;
+};
+typedef enum {
+ RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0,
+ RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1,
+ RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2,
+ RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3,
+ RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4,
+ RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5,
+ RD_KAFKA_CONSUMER_GROUP_STATE__CNT,
+} rd_kafka_consumer_group_state_t;
+struct rd_kafka_group_info {
+ struct rd_kafka_metadata_broker broker;
+ char *group;
+ rd_kafka_resp_err_t err;
+ char *state;
+ char *protocol_type;
+ char *protocol;
+ struct rd_kafka_group_member_info *members;
+ int member_cnt;
+};
+struct rd_kafka_group_list {
+ struct rd_kafka_group_info *groups;
+ int group_cnt;
+};
+rd_kafka_resp_err_t rd_kafka_list_groups(rd_kafka_t *rk, const char *group, const struct rd_kafka_group_list **grplistp, int timeout_ms);
+const char *rd_kafka_consumer_group_state_name(rd_kafka_consumer_group_state_t state);
+rd_kafka_consumer_group_state_t rd_kafka_consumer_group_state_code(const char *name);
+void rd_kafka_group_list_destroy(const struct rd_kafka_group_list *grplist);
+int rd_kafka_brokers_add(rd_kafka_t *rk, const char *brokerlist);
+void rd_kafka_set_logger(rd_kafka_t *rk, void (*func)(const rd_kafka_t *rk, int level, const char *fac, const char *buf));
+void rd_kafka_set_log_level(rd_kafka_t *rk, int level);
+void rd_kafka_log_print(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+void rd_kafka_log_syslog(const rd_kafka_t *rk, int level, const char *fac, const char *buf);
+int rd_kafka_outq_len(rd_kafka_t *rk);
+void rd_kafka_dump(FILE *fp, rd_kafka_t *rk);
+int rd_kafka_thread_cnt(void);
+typedef enum rd_kafka_thread_type_t {
+ RD_KAFKA_THREAD_MAIN,
+ RD_KAFKA_THREAD_BACKGROUND,
+ RD_KAFKA_THREAD_BROKER,
+} rd_kafka_thread_type_t;
+int rd_kafka_wait_destroyed(int timeout_ms);
+int rd_kafka_unittest(void);
+rd_kafka_resp_err_t rd_kafka_poll_set_consumer(rd_kafka_t *rk);
+typedef int rd_kafka_event_type_t;
+rd_kafka_event_type_t rd_kafka_event_type(const rd_kafka_event_t *rkev);
+const char *rd_kafka_event_name(const rd_kafka_event_t *rkev);
+void rd_kafka_event_destroy(rd_kafka_event_t *rkev);
+const rd_kafka_message_t *rd_kafka_event_message_next(rd_kafka_event_t *rkev);
+size_t rd_kafka_event_message_array(rd_kafka_event_t *rkev, const rd_kafka_message_t **rkmessages, size_t size);
+size_t rd_kafka_event_message_count(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_config_string(rd_kafka_event_t *rkev);
+rd_kafka_resp_err_t rd_kafka_event_error(rd_kafka_event_t *rkev);
+const char *rd_kafka_event_error_string(rd_kafka_event_t *rkev);
+int rd_kafka_event_error_is_fatal(rd_kafka_event_t *rkev);
+void *rd_kafka_event_opaque(rd_kafka_event_t *rkev);
+int rd_kafka_event_log(rd_kafka_event_t *rkev, const char **fac, const char **str, int *level);
+int rd_kafka_event_debug_contexts(rd_kafka_event_t *rkev, char *dst, size_t dstsize);
+const char *rd_kafka_event_stats(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_list_t *rd_kafka_event_topic_partition_list(rd_kafka_event_t *rkev);
+rd_kafka_topic_partition_t *rd_kafka_event_topic_partition(rd_kafka_event_t *rkev);
+typedef rd_kafka_event_t rd_kafka_CreateTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_CreateAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteAcls_result_t;
+typedef rd_kafka_event_t rd_kafka_CreatePartitions_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_IncrementalAlterConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConfigs_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteRecords_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeConsumerGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteGroups_result_t;
+typedef rd_kafka_event_t rd_kafka_DeleteConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_ListConsumerGroupOffsets_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeTopics_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeCluster_result_t;
+typedef rd_kafka_event_t rd_kafka_DescribeUserScramCredentials_result_t;
+typedef rd_kafka_event_t rd_kafka_AlterUserScramCredentials_result_t;
+typedef rd_kafka_event_t rd_kafka_ListOffsets_result_t;
+const rd_kafka_CreateTopics_result_t *rd_kafka_event_CreateTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteTopics_result_t *rd_kafka_event_DeleteTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreatePartitions_result_t *rd_kafka_event_CreatePartitions_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConfigs_result_t *rd_kafka_event_AlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_IncrementalAlterConfigs_result_t *rd_kafka_event_IncrementalAlterConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConfigs_result_t *rd_kafka_event_DescribeConfigs_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteRecords_result_t *rd_kafka_event_DeleteRecords_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroups_result_t *rd_kafka_event_ListConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeConsumerGroups_result_t *rd_kafka_event_DescribeConsumerGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeTopics_result_t *rd_kafka_event_DescribeTopics_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeCluster_result_t *rd_kafka_event_DescribeCluster_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteGroups_result_t *rd_kafka_event_DeleteGroups_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteConsumerGroupOffsets_result_t *rd_kafka_event_DeleteConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_CreateAcls_result_t *rd_kafka_event_CreateAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeAcls_result_t *rd_kafka_event_DescribeAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_DeleteAcls_result_t *rd_kafka_event_DeleteAcls_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListConsumerGroupOffsets_result_t *rd_kafka_event_ListConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterConsumerGroupOffsets_result_t *rd_kafka_event_AlterConsumerGroupOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_ListOffsets_result_t *rd_kafka_event_ListOffsets_result(rd_kafka_event_t *rkev);
+const rd_kafka_DescribeUserScramCredentials_result_t *rd_kafka_event_DescribeUserScramCredentials_result(rd_kafka_event_t *rkev);
+const rd_kafka_AlterUserScramCredentials_result_t *rd_kafka_event_AlterUserScramCredentials_result(rd_kafka_event_t *rkev);
+rd_kafka_event_t *rd_kafka_queue_poll(rd_kafka_queue_t *rkqu, int timeout_ms);
+int rd_kafka_queue_poll_callback(rd_kafka_queue_t *rkqu, int timeout_ms);
+typedef rd_kafka_resp_err_t (rd_kafka_plugin_f_conf_init_t)(rd_kafka_conf_t *conf, void **plug_opaquep, char *errstr, size_t errstr_size);
+typedef rd_kafka_conf_res_t (rd_kafka_interceptor_f_on_conf_set_t)(rd_kafka_conf_t *conf, const char *name, const char *val, char *errstr, size_t errstr_size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_dup_t)(rd_kafka_conf_t *new_conf, const rd_kafka_conf_t *old_conf, size_t filter_cnt, const char **filter, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_conf_destroy_t)(void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_new_t)(rd_kafka_t *rk, const rd_kafka_conf_t *conf, void *ic_opaque, char *errstr, size_t errstr_size);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_destroy_t)(rd_kafka_t *rk, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_send_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_acknowledgement_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_consume_t)(rd_kafka_t *rk, rd_kafka_message_t *rkmessage, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_commit_t)(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_request_sent_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_response_received_t)(rd_kafka_t *rk, int sockfd, const char *brokername, int32_t brokerid, int16_t ApiKey, int16_t ApiVersion, int32_t CorrId, size_t size, int64_t rtt, rd_kafka_resp_err_t err, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_start_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_thread_exit_t)(rd_kafka_t *rk, rd_kafka_thread_type_t thread_type, const char *thread_name, void *ic_opaque);
+typedef rd_kafka_resp_err_t (rd_kafka_interceptor_f_on_broker_state_change_t)(rd_kafka_t *rk, int32_t broker_id, const char *secproto, const char *name, int port, const char *state, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_set(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_set_t *on_conf_set, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_dup(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_dup_t *on_conf_dup, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_conf_destroy(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_conf_destroy_t *on_conf_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_conf_interceptor_add_on_new(rd_kafka_conf_t *conf, const char *ic_name, rd_kafka_interceptor_f_on_new_t *on_new, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_destroy(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_destroy_t *on_destroy, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_send(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_send_t *on_send, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_acknowledgement(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_acknowledgement_t *on_acknowledgement, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_consume(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_consume_t *on_consume, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_commit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_commit_t *on_commit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_request_sent(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_request_sent_t *on_request_sent, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_response_received(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_response_received_t *on_response_received, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_start(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_start_t *on_thread_start, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_thread_exit(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_thread_exit_t *on_thread_exit, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_interceptor_add_on_broker_state_change(rd_kafka_t *rk, const char *ic_name, rd_kafka_interceptor_f_on_broker_state_change_t *on_broker_state_change, void *ic_opaque);
+rd_kafka_resp_err_t rd_kafka_topic_result_error(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_error_string(const rd_kafka_topic_result_t *topicres);
+const char *rd_kafka_topic_result_name(const rd_kafka_topic_result_t *topicres);
+const rd_kafka_error_t *rd_kafka_group_result_error(const rd_kafka_group_result_t *groupres);
+const char *rd_kafka_group_result_name(const rd_kafka_group_result_t *groupres);
+const rd_kafka_topic_partition_list_t *rd_kafka_group_result_partitions(const rd_kafka_group_result_t *groupres);
+typedef enum rd_kafka_admin_op_t {
+ RD_KAFKA_ADMIN_OP_ANY = 0,
+ RD_KAFKA_ADMIN_OP_CREATETOPICS,
+ RD_KAFKA_ADMIN_OP_DELETETOPICS,
+ RD_KAFKA_ADMIN_OP_CREATEPARTITIONS,
+ RD_KAFKA_ADMIN_OP_ALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONFIGS,
+ RD_KAFKA_ADMIN_OP_DELETERECORDS,
+ RD_KAFKA_ADMIN_OP_DELETEGROUPS,
+ RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_CREATEACLS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEACLS,
+ RD_KAFKA_ADMIN_OP_DELETEACLS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS,
+ RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS,
+ RD_KAFKA_ADMIN_OP_INCREMENTALALTERCONFIGS,
+ RD_KAFKA_ADMIN_OP_DESCRIBEUSERSCRAMCREDENTIALS,
+ RD_KAFKA_ADMIN_OP_ALTERUSERSCRAMCREDENTIALS,
+ RD_KAFKA_ADMIN_OP_DESCRIBETOPICS,
+ RD_KAFKA_ADMIN_OP_DESCRIBECLUSTER,
+ RD_KAFKA_ADMIN_OP_LISTOFFSETS,
+ RD_KAFKA_ADMIN_OP__CNT,
+} rd_kafka_admin_op_t;
+typedef struct rd_kafka_AdminOptions_s rd_kafka_AdminOptions_t;
+typedef enum rd_kafka_IsolationLevel_t {
+ RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED = 0,
+ RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED = 1,
+} rd_kafka_IsolationLevel_t;
+rd_kafka_AdminOptions_t *rd_kafka_AdminOptions_new(rd_kafka_t *rk, rd_kafka_admin_op_t for_api);
+void rd_kafka_AdminOptions_destroy(rd_kafka_AdminOptions_t *options);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_request_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_operation_timeout(rd_kafka_AdminOptions_t *options, int timeout_ms, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_validate_only(rd_kafka_AdminOptions_t *options, int true_or_false, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_AdminOptions_set_broker(rd_kafka_AdminOptions_t *options, int32_t broker_id, char *errstr, size_t errstr_size);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_require_stable_offsets(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_include_authorized_operations(rd_kafka_AdminOptions_t *options, int true_or_false);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_match_consumer_group_states(rd_kafka_AdminOptions_t *options, const rd_kafka_consumer_group_state_t *consumer_group_states, size_t consumer_group_states_cnt);
+rd_kafka_error_t *rd_kafka_AdminOptions_set_isolation_level(rd_kafka_AdminOptions_t *options, rd_kafka_IsolationLevel_t value);
+void rd_kafka_AdminOptions_set_opaque(rd_kafka_AdminOptions_t *options, void *ev_opaque);
+typedef enum rd_kafka_AclOperation_t {
+ RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
+ RD_KAFKA_ACL_OPERATION_ANY = 1,
+ RD_KAFKA_ACL_OPERATION_ALL = 2,
+ RD_KAFKA_ACL_OPERATION_READ = 3,
+ RD_KAFKA_ACL_OPERATION_WRITE = 4,
+ RD_KAFKA_ACL_OPERATION_CREATE = 5,
+ RD_KAFKA_ACL_OPERATION_DELETE = 6,
+ RD_KAFKA_ACL_OPERATION_ALTER = 7,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
+ RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
+ RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
+ RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
+ RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
+ RD_KAFKA_ACL_OPERATION__CNT,
+} rd_kafka_AclOperation_t;
+typedef struct rd_kafka_NewTopic_s rd_kafka_NewTopic_t;
+rd_kafka_NewTopic_t *rd_kafka_NewTopic_new(const char *topic, int num_partitions, int replication_factor, char *errstr, size_t errstr_size);
+void rd_kafka_NewTopic_destroy(rd_kafka_NewTopic_t *new_topic);
+void rd_kafka_NewTopic_destroy_array(rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_replica_assignment(rd_kafka_NewTopic_t *new_topic, int32_t partition, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_NewTopic_set_config(rd_kafka_NewTopic_t *new_topic, const char *name, const char *value);
+void rd_kafka_CreateTopics(rd_kafka_t *rk, rd_kafka_NewTopic_t **new_topics, size_t new_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreateTopics_result_topics(const rd_kafka_CreateTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteTopic_s rd_kafka_DeleteTopic_t;
+rd_kafka_DeleteTopic_t *rd_kafka_DeleteTopic_new(const char *topic);
+void rd_kafka_DeleteTopic_destroy(rd_kafka_DeleteTopic_t *del_topic);
+void rd_kafka_DeleteTopic_destroy_array(rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt);
+void rd_kafka_DeleteTopics(rd_kafka_t *rk, rd_kafka_DeleteTopic_t **del_topics, size_t del_topic_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_DeleteTopics_result_topics(const rd_kafka_DeleteTopics_result_t *result, size_t *cntp);
+typedef struct rd_kafka_NewPartitions_s rd_kafka_NewPartitions_t;
+rd_kafka_NewPartitions_t *rd_kafka_NewPartitions_new(const char *topic, size_t new_total_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_NewPartitions_destroy(rd_kafka_NewPartitions_t *new_parts);
+void rd_kafka_NewPartitions_destroy_array(rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt);
+rd_kafka_resp_err_t rd_kafka_NewPartitions_set_replica_assignment(rd_kafka_NewPartitions_t *new_parts, int32_t new_partition_idx, int32_t *broker_ids, size_t broker_id_cnt, char *errstr, size_t errstr_size);
+void rd_kafka_CreatePartitions(rd_kafka_t *rk, rd_kafka_NewPartitions_t **new_parts, size_t new_parts_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_result_t **rd_kafka_CreatePartitions_result_topics(const rd_kafka_CreatePartitions_result_t *result, size_t *cntp);
+typedef enum rd_kafka_ConfigSource_t {
+ RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG = 0,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG = 1,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG = 2,
+ RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
+ RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG = 4,
+ RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG = 5,
+ RD_KAFKA_CONFIG_SOURCE__CNT,
+} rd_kafka_ConfigSource_t;
+const char *rd_kafka_ConfigSource_name(rd_kafka_ConfigSource_t confsource);
+typedef struct rd_kafka_ConfigEntry_s rd_kafka_ConfigEntry_t;
+const char *rd_kafka_ConfigEntry_name(const rd_kafka_ConfigEntry_t *entry);
+const char *rd_kafka_ConfigEntry_value(const rd_kafka_ConfigEntry_t *entry);
+rd_kafka_ConfigSource_t rd_kafka_ConfigEntry_source(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_read_only(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_default(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_sensitive(const rd_kafka_ConfigEntry_t *entry);
+int rd_kafka_ConfigEntry_is_synonym(const rd_kafka_ConfigEntry_t *entry);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, size_t *cntp);
+typedef enum rd_kafka_ResourceType_t {
+ RD_KAFKA_RESOURCE_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_ANY = 1,
+ RD_KAFKA_RESOURCE_TOPIC = 2,
+ RD_KAFKA_RESOURCE_GROUP = 3,
+ RD_KAFKA_RESOURCE_BROKER = 4,
+ RD_KAFKA_RESOURCE__CNT,
+} rd_kafka_ResourceType_t;
+typedef enum rd_kafka_ResourcePatternType_t {
+ RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
+ RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
+ RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
+ RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
+ RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
+ RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT,
+} rd_kafka_ResourcePatternType_t;
+typedef enum rd_kafka_AlterConfigOpType_t {
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET = 0,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE = 1,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND = 2,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT = 3,
+ RD_KAFKA_ALTER_CONFIG_OP_TYPE__CNT,
+} rd_kafka_AlterConfigOpType_t;
+const char *rd_kafka_ResourcePatternType_name(rd_kafka_ResourcePatternType_t resource_pattern_type);
+const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype);
+typedef struct rd_kafka_ConfigResource_s rd_kafka_ConfigResource_t;
+rd_kafka_ConfigResource_t *rd_kafka_ConfigResource_new(rd_kafka_ResourceType_t restype, const char *resname);
+void rd_kafka_ConfigResource_destroy(rd_kafka_ConfigResource_t *config);
+void rd_kafka_ConfigResource_destroy_array(rd_kafka_ConfigResource_t **config, size_t config_cnt);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_set_config(rd_kafka_ConfigResource_t *config, const char *name, const char *value);
+rd_kafka_error_t *rd_kafka_ConfigResource_add_incremental_config(rd_kafka_ConfigResource_t *config, const char *name, rd_kafka_AlterConfigOpType_t op_type, const char *value);
+const rd_kafka_ConfigEntry_t **rd_kafka_ConfigResource_configs(const rd_kafka_ConfigResource_t *config, size_t *cntp);
+rd_kafka_ResourceType_t rd_kafka_ConfigResource_type(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_name(const rd_kafka_ConfigResource_t *config);
+rd_kafka_resp_err_t rd_kafka_ConfigResource_error(const rd_kafka_ConfigResource_t *config);
+const char *rd_kafka_ConfigResource_error_string(const rd_kafka_ConfigResource_t *config);
+void rd_kafka_AlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_AlterConfigs_result_resources(const rd_kafka_AlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_IncrementalAlterConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_IncrementalAlterConfigs_result_resources(const rd_kafka_IncrementalAlterConfigs_result_t *result, size_t *cntp);
+void rd_kafka_DescribeConfigs(rd_kafka_t *rk, rd_kafka_ConfigResource_t **configs, size_t config_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConfigResource_t **rd_kafka_DescribeConfigs_result_resources(const rd_kafka_DescribeConfigs_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteRecords_s rd_kafka_DeleteRecords_t;
+rd_kafka_DeleteRecords_t *rd_kafka_DeleteRecords_new(const rd_kafka_topic_partition_list_t *before_offsets);
+void rd_kafka_DeleteRecords_destroy(rd_kafka_DeleteRecords_t *del_records);
+void rd_kafka_DeleteRecords_destroy_array(rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt);
+void rd_kafka_DeleteRecords(rd_kafka_t *rk, rd_kafka_DeleteRecords_t **del_records, size_t del_record_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_topic_partition_list_t *rd_kafka_DeleteRecords_result_offsets(const rd_kafka_DeleteRecords_result_t *result);
+typedef struct rd_kafka_TopicCollection_s rd_kafka_TopicCollection_t;
+typedef struct rd_kafka_TopicPartitionInfo_s rd_kafka_TopicPartitionInfo_t;
+typedef struct rd_kafka_TopicDescription_s rd_kafka_TopicDescription_t;
+rd_kafka_TopicCollection_t *rd_kafka_TopicCollection_of_topic_names(const char **topics, size_t topics_cnt);
+void rd_kafka_TopicCollection_destroy(rd_kafka_TopicCollection_t *topics);
+void rd_kafka_DescribeTopics(rd_kafka_t *rk, const rd_kafka_TopicCollection_t *topics, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_TopicDescription_t **rd_kafka_DescribeTopics_result_topics(const rd_kafka_DescribeTopics_result_t *result, size_t *cntp);
+const rd_kafka_TopicPartitionInfo_t **rd_kafka_TopicDescription_partitions(const rd_kafka_TopicDescription_t *topicdesc, size_t *cntp);
+const int rd_kafka_TopicPartitionInfo_partition(const rd_kafka_TopicPartitionInfo_t *partition);
+const rd_kafka_Node_t *rd_kafka_TopicPartitionInfo_leader(const rd_kafka_TopicPartitionInfo_t *partition);
+const rd_kafka_Node_t **rd_kafka_TopicPartitionInfo_isr(const rd_kafka_TopicPartitionInfo_t *partition, size_t *cntp);
+const rd_kafka_Node_t **rd_kafka_TopicPartitionInfo_replicas(const rd_kafka_TopicPartitionInfo_t *partition, size_t *cntp);
+const rd_kafka_AclOperation_t *rd_kafka_TopicDescription_authorized_operations(const rd_kafka_TopicDescription_t *topicdesc, size_t *cntp);
+const char *rd_kafka_TopicDescription_name(const rd_kafka_TopicDescription_t *topicdesc);
+const rd_kafka_Uuid_t *rd_kafka_TopicDescription_topic_id(const rd_kafka_TopicDescription_t *topicdesc);
+int rd_kafka_TopicDescription_is_internal(const rd_kafka_TopicDescription_t *topicdesc);
+const rd_kafka_error_t *rd_kafka_TopicDescription_error(const rd_kafka_TopicDescription_t *topicdesc);
+void rd_kafka_DescribeCluster(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_Node_t **rd_kafka_DescribeCluster_result_nodes(const rd_kafka_DescribeCluster_result_t *result, size_t *cntp);
+const rd_kafka_AclOperation_t *rd_kafka_DescribeCluster_result_authorized_operations(const rd_kafka_DescribeCluster_result_t *result, size_t *cntp);
+const rd_kafka_Node_t *rd_kafka_DescribeCluster_result_controller(const rd_kafka_DescribeCluster_result_t *result);
+const char *rd_kafka_DescribeCluster_result_cluster_id(const rd_kafka_DescribeCluster_result_t *result);
+typedef struct rd_kafka_ConsumerGroupListing_s rd_kafka_ConsumerGroupListing_t;
+typedef struct rd_kafka_ListConsumerGroupsResult_s rd_kafka_ListConsumerGroupsResult_t;
+void rd_kafka_ListConsumerGroups(rd_kafka_t *rk, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const char *rd_kafka_ConsumerGroupListing_group_id(const rd_kafka_ConsumerGroupListing_t *grplist);
+int rd_kafka_ConsumerGroupListing_is_simple_consumer_group(const rd_kafka_ConsumerGroupListing_t *grplist);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupListing_state(const rd_kafka_ConsumerGroupListing_t *grplist);
+const rd_kafka_ConsumerGroupListing_t **rd_kafka_ListConsumerGroups_result_valid(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+const rd_kafka_error_t **rd_kafka_ListConsumerGroups_result_errors(const rd_kafka_ListConsumerGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ConsumerGroupDescription_s rd_kafka_ConsumerGroupDescription_t;
+typedef struct rd_kafka_MemberDescription_s rd_kafka_MemberDescription_t;
+typedef struct rd_kafka_MemberAssignment_s rd_kafka_MemberAssignment_t;
+void rd_kafka_DescribeConsumerGroups(rd_kafka_t *rk, const char **groups, size_t groups_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_ConsumerGroupDescription_t **rd_kafka_DescribeConsumerGroups_result_groups(const rd_kafka_DescribeConsumerGroups_result_t *result, size_t *cntp);
+const char *rd_kafka_ConsumerGroupDescription_group_id(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_error_t *rd_kafka_ConsumerGroupDescription_error(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+int rd_kafka_ConsumerGroupDescription_is_simple_consumer_group(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const char *rd_kafka_ConsumerGroupDescription_partition_assignor(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_AclOperation_t *rd_kafka_ConsumerGroupDescription_authorized_operations(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t *cntp);
+rd_kafka_consumer_group_state_t rd_kafka_ConsumerGroupDescription_state(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_Node_t *rd_kafka_ConsumerGroupDescription_coordinator(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+size_t rd_kafka_ConsumerGroupDescription_member_count(const rd_kafka_ConsumerGroupDescription_t *grpdesc);
+const rd_kafka_MemberDescription_t *rd_kafka_ConsumerGroupDescription_member(const rd_kafka_ConsumerGroupDescription_t *grpdesc, size_t idx);
+const char *rd_kafka_MemberDescription_client_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_group_instance_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_consumer_id(const rd_kafka_MemberDescription_t *member);
+const char *rd_kafka_MemberDescription_host(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_MemberAssignment_t *rd_kafka_MemberDescription_assignment(const rd_kafka_MemberDescription_t *member);
+const rd_kafka_topic_partition_list_t *rd_kafka_MemberAssignment_partitions(const rd_kafka_MemberAssignment_t *assignment);
+typedef struct rd_kafka_DeleteGroup_s rd_kafka_DeleteGroup_t;
+rd_kafka_DeleteGroup_t *rd_kafka_DeleteGroup_new(const char *group);
+void rd_kafka_DeleteGroup_destroy(rd_kafka_DeleteGroup_t *del_group);
+void rd_kafka_DeleteGroup_destroy_array(rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt);
+void rd_kafka_DeleteGroups(rd_kafka_t *rk, rd_kafka_DeleteGroup_t **del_groups, size_t del_group_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteGroups_result_groups(const rd_kafka_DeleteGroups_result_t *result, size_t *cntp);
+typedef struct rd_kafka_ListConsumerGroupOffsets_s rd_kafka_ListConsumerGroupOffsets_t;
+rd_kafka_ListConsumerGroupOffsets_t *rd_kafka_ListConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_ListConsumerGroupOffsets_destroy(rd_kafka_ListConsumerGroupOffsets_t *list_grpoffsets);
+void rd_kafka_ListConsumerGroupOffsets_destroy_array(rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffset_cnt);
+void rd_kafka_ListConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_ListConsumerGroupOffsets_t **list_grpoffsets, size_t list_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_ListConsumerGroupOffsets_result_groups(const rd_kafka_ListConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_AlterConsumerGroupOffsets_s rd_kafka_AlterConsumerGroupOffsets_t;
+rd_kafka_AlterConsumerGroupOffsets_t *rd_kafka_AlterConsumerGroupOffsets_new(const char *group_id, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_AlterConsumerGroupOffsets_destroy(rd_kafka_AlterConsumerGroupOffsets_t *alter_grpoffsets);
+void rd_kafka_AlterConsumerGroupOffsets_destroy_array(rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffset_cnt);
+void rd_kafka_AlterConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_AlterConsumerGroupOffsets_t **alter_grpoffsets, size_t alter_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_AlterConsumerGroupOffsets_result_groups(const rd_kafka_AlterConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef struct rd_kafka_DeleteConsumerGroupOffsets_s rd_kafka_DeleteConsumerGroupOffsets_t;
+rd_kafka_DeleteConsumerGroupOffsets_t *rd_kafka_DeleteConsumerGroupOffsets_new(const char *group, const rd_kafka_topic_partition_list_t *partitions);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy(rd_kafka_DeleteConsumerGroupOffsets_t *del_grpoffsets);
+void rd_kafka_DeleteConsumerGroupOffsets_destroy_array(rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffset_cnt);
+void rd_kafka_DeleteConsumerGroupOffsets(rd_kafka_t *rk, rd_kafka_DeleteConsumerGroupOffsets_t **del_grpoffsets, size_t del_grpoffsets_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_group_result_t **rd_kafka_DeleteConsumerGroupOffsets_result_groups(const rd_kafka_DeleteConsumerGroupOffsets_result_t *result, size_t *cntp);
+typedef enum rd_kafka_OffsetSpec_t {
+ RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP = (- 3),
+ RD_KAFKA_OFFSET_SPEC_EARLIEST = (- 2),
+ RD_KAFKA_OFFSET_SPEC_LATEST = (- 1),
+} rd_kafka_OffsetSpec_t;
+typedef struct rd_kafka_ListOffsetsResultInfo_s rd_kafka_ListOffsetsResultInfo_t;
+const rd_kafka_topic_partition_t *rd_kafka_ListOffsetsResultInfo_topic_partition(const rd_kafka_ListOffsetsResultInfo_t *result_info);
+int64_t rd_kafka_ListOffsetsResultInfo_timestamp(const rd_kafka_ListOffsetsResultInfo_t *result_info);
+const rd_kafka_ListOffsetsResultInfo_t **rd_kafka_ListOffsets_result_infos(const rd_kafka_ListOffsets_result_t *result, size_t *cntp);
+void rd_kafka_ListOffsets(rd_kafka_t *rk, rd_kafka_topic_partition_list_t *topic_partitions, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef enum rd_kafka_ScramMechanism_t {
+ RD_KAFKA_SCRAM_MECHANISM_UNKNOWN = 0,
+ RD_KAFKA_SCRAM_MECHANISM_SHA_256 = 1,
+ RD_KAFKA_SCRAM_MECHANISM_SHA_512 = 2,
+ RD_KAFKA_SCRAM_MECHANISM__CNT,
+} rd_kafka_ScramMechanism_t;
+typedef struct rd_kafka_ScramCredentialInfo_s rd_kafka_ScramCredentialInfo_t;
+rd_kafka_ScramMechanism_t rd_kafka_ScramCredentialInfo_mechanism(const rd_kafka_ScramCredentialInfo_t *scram_credential_info);
+int32_t rd_kafka_ScramCredentialInfo_iterations(const rd_kafka_ScramCredentialInfo_t *scram_credential_info);
+typedef struct rd_kafka_UserScramCredentialsDescription_s rd_kafka_UserScramCredentialsDescription_t;
+const char *rd_kafka_UserScramCredentialsDescription_user(const rd_kafka_UserScramCredentialsDescription_t *description);
+const rd_kafka_error_t *rd_kafka_UserScramCredentialsDescription_error(const rd_kafka_UserScramCredentialsDescription_t *description);
+size_t rd_kafka_UserScramCredentialsDescription_scramcredentialinfo_count(const rd_kafka_UserScramCredentialsDescription_t *description);
+const rd_kafka_ScramCredentialInfo_t *rd_kafka_UserScramCredentialsDescription_scramcredentialinfo(const rd_kafka_UserScramCredentialsDescription_t *description, size_t idx);
+const rd_kafka_UserScramCredentialsDescription_t **rd_kafka_DescribeUserScramCredentials_result_descriptions(const rd_kafka_DescribeUserScramCredentials_result_t *result, size_t *cntp);
+void rd_kafka_DescribeUserScramCredentials(rd_kafka_t *rk, const char **users, size_t user_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_UserScramCredentialAlteration_s rd_kafka_UserScramCredentialAlteration_t;
+rd_kafka_UserScramCredentialAlteration_t *rd_kafka_UserScramCredentialUpsertion_new(const char *username, rd_kafka_ScramMechanism_t mechanism, int32_t iterations, const unsigned char *password, size_t password_size, const unsigned char *salt, size_t salt_size);
+rd_kafka_UserScramCredentialAlteration_t *rd_kafka_UserScramCredentialDeletion_new(const char *username, rd_kafka_ScramMechanism_t mechanism);
+void rd_kafka_UserScramCredentialAlteration_destroy(rd_kafka_UserScramCredentialAlteration_t *alteration);
+void rd_kafka_UserScramCredentialAlteration_destroy_array(rd_kafka_UserScramCredentialAlteration_t **alterations, size_t alteration_cnt);
+typedef struct rd_kafka_AlterUserScramCredentials_result_response_s rd_kafka_AlterUserScramCredentials_result_response_t;
+const char *rd_kafka_AlterUserScramCredentials_result_response_user(const rd_kafka_AlterUserScramCredentials_result_response_t *response);
+const rd_kafka_error_t *rd_kafka_AlterUserScramCredentials_result_response_error(const rd_kafka_AlterUserScramCredentials_result_response_t *response);
+const rd_kafka_AlterUserScramCredentials_result_response_t **rd_kafka_AlterUserScramCredentials_result_responses(const rd_kafka_AlterUserScramCredentials_result_t *result, size_t *cntp);
+void rd_kafka_AlterUserScramCredentials(rd_kafka_t *rk, rd_kafka_UserScramCredentialAlteration_t **alterations, size_t alteration_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_AclBinding_s rd_kafka_AclBinding_t;
+typedef rd_kafka_AclBinding_t rd_kafka_AclBindingFilter_t;
+const rd_kafka_error_t *rd_kafka_acl_result_error(const rd_kafka_acl_result_t *aclres);
+const char *rd_kafka_AclOperation_name(rd_kafka_AclOperation_t acl_operation);
+typedef enum rd_kafka_AclPermissionType_t {
+ RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
+ RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
+ RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
+ RD_KAFKA_ACL_PERMISSION_TYPE__CNT,
+} rd_kafka_AclPermissionType_t;
+const char *rd_kafka_AclPermissionType_name(rd_kafka_AclPermissionType_t acl_permission_type);
+rd_kafka_AclBinding_t *rd_kafka_AclBinding_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_AclBindingFilter_t *rd_kafka_AclBindingFilter_new(rd_kafka_ResourceType_t restype, const char *name, rd_kafka_ResourcePatternType_t resource_pattern_type, const char *principal, const char *host, rd_kafka_AclOperation_t operation, rd_kafka_AclPermissionType_t permission_type, char *errstr, size_t errstr_size);
+rd_kafka_ResourceType_t rd_kafka_AclBinding_restype(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_name(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_principal(const rd_kafka_AclBinding_t *acl);
+const char *rd_kafka_AclBinding_host(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclOperation_t rd_kafka_AclBinding_operation(const rd_kafka_AclBinding_t *acl);
+rd_kafka_AclPermissionType_t rd_kafka_AclBinding_permission_type(const rd_kafka_AclBinding_t *acl);
+rd_kafka_ResourcePatternType_t rd_kafka_AclBinding_resource_pattern_type(const rd_kafka_AclBinding_t *acl);
+const rd_kafka_error_t *rd_kafka_AclBinding_error(const rd_kafka_AclBinding_t *acl);
+void rd_kafka_AclBinding_destroy(rd_kafka_AclBinding_t *acl_binding);
+void rd_kafka_AclBinding_destroy_array(rd_kafka_AclBinding_t **acl_bindings, size_t acl_bindings_cnt);
+const rd_kafka_acl_result_t **rd_kafka_CreateAcls_result_acls(const rd_kafka_CreateAcls_result_t *result, size_t *cntp);
+void rd_kafka_CreateAcls(rd_kafka_t *rk, rd_kafka_AclBinding_t **new_acls, size_t new_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+const rd_kafka_AclBinding_t **rd_kafka_DescribeAcls_result_acls(const rd_kafka_DescribeAcls_result_t *result, size_t *cntp);
+void rd_kafka_DescribeAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t *acl_filter, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+typedef struct rd_kafka_DeleteAcls_result_response_s rd_kafka_DeleteAcls_result_response_t;
+const rd_kafka_DeleteAcls_result_response_t **rd_kafka_DeleteAcls_result_responses(const rd_kafka_DeleteAcls_result_t *result, size_t *cntp);
+const rd_kafka_error_t *rd_kafka_DeleteAcls_result_response_error(const rd_kafka_DeleteAcls_result_response_t *result_response);
+const rd_kafka_AclBinding_t **rd_kafka_DeleteAcls_result_response_matching_acls(const rd_kafka_DeleteAcls_result_response_t *result_response, size_t *matching_acls_cntp);
+void rd_kafka_DeleteAcls(rd_kafka_t *rk, rd_kafka_AclBindingFilter_t **del_acls, size_t del_acls_cnt, const rd_kafka_AdminOptions_t *options, rd_kafka_queue_t *rkqu);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token(rd_kafka_t *rk, const char *token_value, int64_t md_lifetime_ms, const char *md_principal_name, const char **extensions, size_t extension_size, char *errstr, size_t errstr_size);
+rd_kafka_resp_err_t rd_kafka_oauthbearer_set_token_failure(rd_kafka_t *rk, const char *errstr);
+rd_kafka_error_t *rd_kafka_init_transactions(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_begin_transaction(rd_kafka_t *rk);
+rd_kafka_error_t *rd_kafka_send_offsets_to_transaction(rd_kafka_t *rk, const rd_kafka_topic_partition_list_t *offsets, const rd_kafka_consumer_group_metadata_t *cgmetadata, int timeout_ms);
+rd_kafka_error_t *rd_kafka_commit_transaction(rd_kafka_t *rk, int timeout_ms);
+rd_kafka_error_t *rd_kafka_abort_transaction(rd_kafka_t *rk, int timeout_ms);
+typedef struct rd_kafka_mock_cluster_s rd_kafka_mock_cluster_t;
+rd_kafka_mock_cluster_t *rd_kafka_mock_cluster_new(rd_kafka_t *rk, int broker_cnt);
+void rd_kafka_mock_cluster_destroy(rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_t *rd_kafka_mock_cluster_handle(const rd_kafka_mock_cluster_t *mcluster);
+rd_kafka_mock_cluster_t *rd_kafka_handle_mock_cluster(const rd_kafka_t *rk);
+const char *rd_kafka_mock_cluster_bootstraps(const rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_clear_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey);
+void rd_kafka_mock_push_request_errors(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, ...);
+void rd_kafka_mock_push_request_errors_array(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, size_t cnt, const rd_kafka_resp_err_t *errors);
+rd_kafka_resp_err_t rd_kafka_mock_broker_push_request_error_rtts(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t cnt, ...);
+rd_kafka_resp_err_t rd_kafka_mock_broker_error_stack_cnt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int16_t ApiKey, size_t *cntp);
+void rd_kafka_mock_topic_set_error(rd_kafka_mock_cluster_t *mcluster, const char *topic, rd_kafka_resp_err_t err);
+rd_kafka_resp_err_t rd_kafka_mock_topic_create(rd_kafka_mock_cluster_t *mcluster, const char *topic, int partition_cnt, int replication_factor);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_leader(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_partition_set_follower_wmarks(rd_kafka_mock_cluster_t *mcluster, const char *topic, int32_t partition, int64_t lo, int64_t hi);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_down(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_up(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rtt(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, int rtt_ms);
+rd_kafka_resp_err_t rd_kafka_mock_broker_set_rack(rd_kafka_mock_cluster_t *mcluster, int32_t broker_id, const char *rack);
+rd_kafka_resp_err_t rd_kafka_mock_coordinator_set(rd_kafka_mock_cluster_t *mcluster, const char *key_type, const char *key, int32_t broker_id);
+rd_kafka_resp_err_t rd_kafka_mock_set_apiversion(rd_kafka_mock_cluster_t *mcluster, int16_t ApiKey, int16_t MinVersion, int16_t MaxVersion);
+void rd_kafka_mock_start_request_tracking(rd_kafka_mock_cluster_t *mcluster);
+void rd_kafka_mock_stop_request_tracking(rd_kafka_mock_cluster_t *mcluster);
+typedef struct rd_kafka_mock_request_s rd_kafka_mock_request_t;
+void rd_kafka_mock_request_destroy(rd_kafka_mock_request_t *mreq);
+int32_t rd_kafka_mock_request_id(rd_kafka_mock_request_t *mreq);
+int16_t rd_kafka_mock_request_api_key(rd_kafka_mock_request_t *mreq);
+int64_t rd_kafka_mock_request_timestamp(rd_kafka_mock_request_t *mreq);
+rd_kafka_mock_request_t **rd_kafka_mock_get_requests(rd_kafka_mock_cluster_t *mcluster, size_t *cntp);
+void rd_kafka_mock_clear_requests(rd_kafka_mock_cluster_t *mcluster);
+'
+
\rd_kafka_err2name() (
+ int $err
+ ): string
+
int
Error codestring
The error name as a string.\rd_kafka_err2str() (
+ int $err
+ ): string
+
int
Error codestring
The error description a string.\rd_kafka_errno2err() (
+ int $errnox
+ ): int
+
int
A system errnoint
A kafka error code as an integer.Deprecated
+\rd_kafka_errno() ( ): int
+
int
The system errno as an integer.Deprecated
+\rd_kafka_offset_tail() (
+ int $cnt
+ ): int
+
int
int
Returns the special offset as an integer.\rd_kafka_thread_cnt() ( ): int
+
int
Retrieve the current number of threads in use by librdkafka.\rd_kafka_version() ( ): string
+
string
The librdkafka version.{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Va=/["'&<>]/;qn.exports=za;function za(e){var t=""+e,r=Va.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i