diff --git a/.ffigen.yml b/.ffigen.yml index 3f543a37..e2cf6dd0 100644 --- a/.ffigen.yml +++ b/.ffigen.yml @@ -3,6 +3,8 @@ headerFiles: - rdkafka_mock.h headerSearchPaths: - resources/ffigen/tmp + - /usr/include/aarch64-linux-gnu + - /opt/homebrew/include libraryFile: librdkafka.so.1 generatorClass: RdKafka\FFIGen\MultiVersionGenerator outputPath: resources/ffigen/tmp diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 9322057f..364f83e3 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -12,9 +12,9 @@ jobs: fail-fast: true matrix: php: - - '8.0' - '8.1' - '8.2' + - '8.3' defaults: run: shell: bash diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 81723151..af10e92b 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -12,11 +12,11 @@ jobs: fail-fast: true matrix: php: - - '8.0' - '8.1' - '8.2' + - '8.3' librdkafka: - - '2.0.2' + - '2.3.0' defaults: run: shell: bash @@ -35,9 +35,9 @@ jobs: run: | nuget install librdkafka.redist -Version ${{ matrix.librdkafka }} choco install --no-progress wget nssm - wget -q -O kafka_2.13-3.3.2.tgz http://ftp.fau.de/apache/kafka/3.3.2/kafka_2.13-3.3.2.tgz - tar -xzf kafka_2.13-3.3.2.tgz - cp -pr kafka_2.13-3.3.2 /c/kafka + wget -q -O kafka_2.13-3.6.1.tgz http://ftp.fau.de/apache/kafka/3.6.1/kafka_2.13-3.6.1.tgz + tar -xzf kafka_2.13-3.6.1.tgz + cp -pr kafka_2.13-3.6.1 /c/kafka sed -i "s|broker.id=0|broker.id=111|g" /c/kafka/config/server.properties nssm install zookeeper /c/kafka/bin/windows/zookeeper-server-start.bat /c/kafka/config/zookeeper.properties nssm set zookeeper AppExit Default Exit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2b69f82..65b14398 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,19 +12,23 @@ jobs: fail-fast: false matrix: include: - - php: '8.0' - librdkafka: 'v2.0.2' + - php: '8.1' + librdkafka: 'v2.3.0' publish: true exclude: - - php: '8.0' - librdkafka: 'v2.0.2' + - php: '8.1' + librdkafka: 'v2.3.0' publish: false php: - '7.4' - '8.0' - '8.1' - '8.2' + - '8.3' librdkafka: + - 'v2.3.0' + - 'v2.2.0' + - 'v2.1.1' - 'v2.0.2' - 'v1.9.2' - 'v1.8.2' @@ -42,14 +46,14 @@ jobs: continue-on-error: ${{ matrix.librdkafka == 'master' }} services: zookeeper: - image: confluentinc/cp-zookeeper:7.3.1 + image: confluentinc/cp-zookeeper:7.5.2 ports: - 2181:2181 env: ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 kafka: - image: confluentinc/cp-kafka:7.3.1 + image: confluentinc/cp-kafka:7.5.2 ports: - 9092:9092 env: diff --git a/docker-compose.yml b/docker-compose.yml index b2ee680a..880bc14a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ networks: services: zookeeper: - image: confluentinc/cp-zookeeper:7.3.1 + image: confluentinc/cp-zookeeper:7.5.2 ports: - 2181:2181 environment: @@ -15,7 +15,7 @@ services: - php-rdkafka-ffi kafka: - image: confluentinc/cp-kafka:7.3.1 + image: confluentinc/cp-kafka:7.5.2 ports: - 9092:9092 hostname: kafka @@ -90,6 +90,17 @@ services: networks: - php-rdkafka-ffi + php83: + build: + context: resources/docker/php83-librdkafka-ffi + image: php83-librdkafka-ffi:latest + volumes: + - .:/app + depends_on: + - kafka + networks: + - php-rdkafka-ffi + mkdocs: build: context: resources/docker/mkdocs-material diff --git a/resources/docker/php74-librdkafka-ffi/Dockerfile b/resources/docker/php74-librdkafka-ffi/Dockerfile index e1a4720c..c6825a05 100644 --- a/resources/docker/php74-librdkafka-ffi/Dockerfile +++ b/resources/docker/php74-librdkafka-ffi/Dockerfile @@ -1,7 +1,7 @@ FROM php:7.4-cli # enable ffi and install librdkafka -ARG LIBRDKAFKA_VERSION=v2.0.2 +ARG LIBRDKAFKA_VERSION=v2.3.0 ENV LIBRDKAFKA_VERSION=$LIBRDKAFKA_VERSION RUN set -e; \ apt-get update; \ diff --git a/resources/docker/php80-librdkafka-ffi/Dockerfile b/resources/docker/php80-librdkafka-ffi/Dockerfile index d03dd311..780d61af 100644 --- a/resources/docker/php80-librdkafka-ffi/Dockerfile +++ b/resources/docker/php80-librdkafka-ffi/Dockerfile @@ -1,11 +1,11 @@ FROM php:8.0-cli # enable ffi and install librdkafka -ARG LIBRDKAFKA_VERSION=v2.0.2 +ARG LIBRDKAFKA_VERSION=v2.3.0 ENV LIBRDKAFKA_VERSION=$LIBRDKAFKA_VERSION RUN set -e; \ apt-get update; \ - apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev; \ + apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev libc6-dev; \ docker-php-ext-configure ffi; \ docker-php-ext-install -j$(nproc) ffi pcntl; \ git clone --branch "${LIBRDKAFKA_VERSION}" --depth 1 https://github.com/confluentinc/librdkafka.git /tmp/librdkafka; \ diff --git a/resources/docker/php81-librdkafka-ffi/Dockerfile b/resources/docker/php81-librdkafka-ffi/Dockerfile index 101d5e93..68e8bdc0 100644 --- a/resources/docker/php81-librdkafka-ffi/Dockerfile +++ b/resources/docker/php81-librdkafka-ffi/Dockerfile @@ -1,11 +1,11 @@ FROM php:8.1-cli # enable ffi and install librdkafka -ARG LIBRDKAFKA_VERSION=v2.0.2 +ARG LIBRDKAFKA_VERSION=v2.3.0 ENV LIBRDKAFKA_VERSION=$LIBRDKAFKA_VERSION RUN set -e; \ apt-get update; \ - apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev; \ + apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev libc6-dev; \ docker-php-ext-configure ffi; \ docker-php-ext-install -j$(nproc) ffi pcntl; \ git clone --branch "${LIBRDKAFKA_VERSION}" --depth 1 https://github.com/confluentinc/librdkafka.git /tmp/librdkafka; \ @@ -33,6 +33,8 @@ RUN git clone --branch "$RDKAFKA_EXT_VERSION" --depth 1 https://github.com/arnau make install; \ rm -rf /tmp/*; +RUN apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev libc6-dev; + ENV COMPOSER_HOME /tmp ENV COMPOSER_ALLOW_SUPERUSER 1 COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/resources/docker/php82-librdkafka-ffi/Dockerfile b/resources/docker/php82-librdkafka-ffi/Dockerfile index 50f8f82a..a3f00f26 100644 --- a/resources/docker/php82-librdkafka-ffi/Dockerfile +++ b/resources/docker/php82-librdkafka-ffi/Dockerfile @@ -1,11 +1,11 @@ FROM php:8.2-cli # enable ffi and install librdkafka -ARG LIBRDKAFKA_VERSION=v2.0.2 +ARG LIBRDKAFKA_VERSION=v2.3.0 ENV LIBRDKAFKA_VERSION=$LIBRDKAFKA_VERSION RUN set -e; \ apt-get update; \ - apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev; \ + apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev libc6-dev; \ docker-php-ext-configure ffi; \ docker-php-ext-install -j$(nproc) ffi pcntl; \ git clone --branch "${LIBRDKAFKA_VERSION}" --depth 1 https://github.com/confluentinc/librdkafka.git /tmp/librdkafka; \ diff --git a/resources/docker/php83-librdkafka-ffi/Dockerfile b/resources/docker/php83-librdkafka-ffi/Dockerfile new file mode 100644 index 00000000..e5b8012e --- /dev/null +++ b/resources/docker/php83-librdkafka-ffi/Dockerfile @@ -0,0 +1,47 @@ +FROM php:8.3-cli + +# enable ffi and install librdkafka +ARG LIBRDKAFKA_VERSION=v2.3.0 +ENV LIBRDKAFKA_VERSION=$LIBRDKAFKA_VERSION +RUN set -e; \ + apt-get update; \ + apt-get install -y --no-install-recommends git zip unzip gdb libffi-dev libc6-dev; \ + docker-php-ext-configure ffi; \ + docker-php-ext-install -j$(nproc) ffi pcntl; \ + git clone --branch "${LIBRDKAFKA_VERSION}" --depth 1 https://github.com/confluentinc/librdkafka.git /tmp/librdkafka; \ + cd /tmp/librdkafka; \ + ./configure; \ + make; \ + make install; \ + ldconfig; \ + apt-get autoremove -y; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/*; + +# install xdebug +ARG XDEBUG_VERSION=beta +RUN pecl install xdebug-${XDEBUG_VERSION}; \ + docker-php-ext-enable xdebug; + +# install rdkafka ext - this is just required to run the compatibility tests +ARG RDKAFKA_EXT_VERSION=6.x +RUN git clone --branch "$RDKAFKA_EXT_VERSION" --depth 1 https://github.com/arnaud-lb/php-rdkafka.git /tmp/php-rdkafka; \ + cd /tmp/php-rdkafka; \ + phpize; \ + ./configure; \ + make; \ + make install; \ + rm -rf /tmp/*; + +ENV COMPOSER_HOME /tmp +ENV COMPOSER_ALLOW_SUPERUSER 1 +COPY --from=composer /usr/bin/composer /usr/bin/composer + +RUN useradd -Ms /bin/bash --user-group --uid 2000 phpdev; \ + mkdir /app; \ + chown phpdev -R /app; \ + chown phpdev -R /tmp; + +USER phpdev + +WORKDIR /app diff --git a/resources/ffigen/LibrdkafkaHeaderFiles.php b/resources/ffigen/LibrdkafkaHeaderFiles.php index 43da717e..afee5852 100644 --- a/resources/ffigen/LibrdkafkaHeaderFiles.php +++ b/resources/ffigen/LibrdkafkaHeaderFiles.php @@ -95,7 +95,7 @@ private function loadSupportedVersions(): array foreach ($releases as $release) { if ($release->prerelease === false) { $version = str_replace('v', '', $release->tag_name); - if (Comparator::greaterThanOrEqualTo($version, '1.0.0') && Comparator::lessThan($version, '2.1.0')) { + if (Comparator::greaterThanOrEqualTo($version, '1.0.0') && Comparator::lessThan($version, '2.4.0')) { $supportedVersions[$version] = sprintf( self::DOWNLOAD_BASE_URL_TEMPLATE, $release->tag_name diff --git a/src/RdKafka/FFI/Library.php b/src/RdKafka/FFI/Library.php index 3086a3e5..56a4fd32 100644 --- a/src/RdKafka/FFI/Library.php +++ b/src/RdKafka/FFI/Library.php @@ -28,8 +28,8 @@ class Library use Methods; public const VERSION_AUTODETECT = ''; - public const VERSION_LATEST = '2.0.2'; - public const PHP_LIBRARY_VERSION = '0.5.0'; + public const VERSION_LATEST = '2.3.0'; + public const PHP_LIBRARY_VERSION = '0.6.0'; private static FFI $ffi; private static string $scope = 'RdKafka'; diff --git a/src/RdKafka/FFI/Methods.php b/src/RdKafka/FFI/Methods.php index b8c73906..60f57781 100644 --- a/src/RdKafka/FFI/Methods.php +++ b/src/RdKafka/FFI/Methods.php @@ -626,7 +626,7 @@ public static function rd_kafka_conf_dup_filter(?\FFI\CData $conf, ?int $filter_ /** *
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 sub-sequent rd_kafka_conf_set_default_topic_conf() calls will replace the current default topic configuration.
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.
json_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/edenhill/librdkafka/wiki/Statistics
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.
* @param \FFI\CData|null $conf rd_kafka_conf_t* @@ -1274,7 +1274,7 @@ public static function rd_kafka_msg_partitioner_murmur2_random(?\FFI\CData $rkt, /** *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 sub-sequently. See rd_kafka_conf_set()
et.al for more information.
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. 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 sub-sequently. See rd_kafka_topic_conf_set()
et.al for more information.
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.
* *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 indefinately for an event, provide -1.
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:
Use rd_kafka_queue_destroy() to loose the reference.
- *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
.offset field is stored as is, it will NOT be + 1.enable.auto.offset.store
must be set to "false" when using this API.enable.auto.offset.store
must be set to "false" when using this API.
+ * 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.
@@ -2190,7 +2195,7 @@ public static function rd_kafka_position(?\FFI\CData $rk, ?\FFI\CData $partition
/**
* 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 asynch 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 trigged by the application calling rd_kafka_poll()
(at regular intervals) or rd_kafka_flush()
(at termination).
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.
@@ -2302,7 +2307,7 @@ public static function rd_kafka_flush(?\FFI\CData $rk, ?int $timeout_ms): int * *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.
- *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.
ic_name
and function has already been added to conf
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a97bdeb12b99da10eff18767b3cadbfd2
*/
@@ -3081,7 +3092,7 @@ public static function rd_kafka_conf_interceptor_add_on_conf_set(?\FFI\CData $co
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_conf_dup 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.
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a375ce703f6247377305dc6a5dfc84429
*/
@@ -3118,7 +3129,7 @@ public static function rd_kafka_conf_interceptor_add_on_conf_destroy(?\FFI\CData
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_new 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.
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a002ef1d350176725b6e9ba93548edf40
*/
@@ -3133,7 +3144,7 @@ public static function rd_kafka_conf_interceptor_add_on_new(?\FFI\CData $conf, ?
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_destroy rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_destroy_t*)(rd_kafka_t*, void*) - Function pointer.
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a11b835cb99dc1cfa03c52465b9837a47
*/
@@ -3163,7 +3174,7 @@ public static function rd_kafka_interceptor_add_on_send(?\FFI\CData $rk, ?string
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_acknowledgement rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_acknowledgement_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#abaf475ab47fff47ab796be1cecbbd370
*/
@@ -3178,7 +3189,7 @@ public static function rd_kafka_interceptor_add_on_acknowledgement(?\FFI\CData $
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_consume rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_consume_t*)(rd_kafka_t*, rd_kafka_message_t*, void*) - Function pointer.
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a0e722a9930897bba81b33de5fe95b6ed
*/
@@ -3193,7 +3204,7 @@ public static function rd_kafka_interceptor_add_on_consume(?\FFI\CData $rk, ?str
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_commit 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*)
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a0d3e29337dbf11762b5a7e492b77b781
*/
@@ -3208,7 +3219,7 @@ public static function rd_kafka_interceptor_add_on_commit(?\FFI\CData $rk, ?stri
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_request_sent 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*)
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.0.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a444032455f98839bef2fb76d15f663c3
*/
@@ -3284,7 +3295,7 @@ public static function rd_kafka_AdminOptions_destroy(?\FFI\CData $options): void
*
* socket.timeout.ms
.
+ * @param int|null $timeout_ms int - Timeout in milliseconds. Defaults to socket.timeout.ms
.
* @param \FFI\CData|null $errstr 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
.
* @param int|null $errstr_size size_t
* @return int 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
.
@@ -3338,6 +3349,7 @@ public static function rd_kafka_AdminOptions_set_validate_only(?\FFI\CData $opti
* Override what broker the Admin request will be sent to.
*By default, Admin requests are sent to the controller broker, with the following exceptions:
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. RD_KAFKA_RESOURCE_BROKER
is allowed per call since these resource requests must be sent to the broker specified in the resource.ssl.key.pem
and ssl.certificate.pem
configuration properties.ssl.ca.pem
configuration property. ssl.ca.pem
configuration property.
+ * encoding
type.
@@ -4137,7 +4152,7 @@ public static function rd_kafka_interceptor_f_on_thread_exit_t(?\FFI\CData $rk,
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_thread_start rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_thread_start_t*)(rd_kafka_t*, rd_kafka_thread_type_t, const char*, void*)
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.2.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#aa46a3bd81acc3861979f43b63f7ea1c8
*/
@@ -4152,7 +4167,7 @@ public static function rd_kafka_interceptor_add_on_thread_start(?\FFI\CData $rk,
* @param string|null $ic_name const char* - Interceptor name, used in logging.
* @param \FFI\CData|\Closure $on_thread_exit rd_kafka_resp_err_t(rd_kafka_interceptor_f_on_thread_exit_t*)(rd_kafka_t*, rd_kafka_thread_type_t, const char*, void*)
* @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function.
- * @return 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
.
+ * @return 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
.
* @since 1.2.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a876a95f3d989ad7cbff048e3449674e6
*/
@@ -4493,11 +4508,13 @@ public static function rd_kafka_consumer_group_metadata_read(?\FFI\CData $cgmdp,
* 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.timeout_ms
milliseconds.transaction.timeout.ms
.
* @return \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.
* @since 1.4.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#abf3e48791cf53ac2c7e30a17ce896f74
@@ -4542,14 +4559,18 @@ public static function rd_kafka_begin_transaction(?\FFI\CData $rk): ?\FFI\CData
* enable.auto.commit
to false on the consumer).offsets
will be ignored, if there are no valid offsets in offsets
the function will return RD_KAFKA_RESP_ERR_NO_ERROR and no action will be taken.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.rk
is not a producer instance, or if the consumer_group_id
or offsets
are empty, RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS if a previous rd_kafka_send_offsets_to_transaction() call is still in progress. Other error codes not listed here may be returned, depending on broker version.
+ * @return \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.
* @since 1.4.0 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a288b31742a707ca14cf07312fbcca881
*/
@@ -4567,7 +4588,9 @@ public static function rd_kafka_send_offsets_to_transaction(?\FFI\CData $rk, ?\F
* timeout_ms
expires, which ever comes first. On timeout the application may call the function again.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.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.
+ * Delete groups from cluster as specified by the del_groups
array of size del_group_cnt
elements.
RD_KAFKA_EVENT_DELETEGROUPS_RESULT
RD_KAFKA_EVENT_DELETEGROUPS_RESULT
del_groups
array.
@@ -5122,7 +5149,7 @@ public static function rd_kafka_DeleteConsumerGroupOffsets_destroy_array(?\FFI\C
}
/**
- * Delete committed offsets for a set of partitions in a conusmer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.
+ *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
ic_name
and function has already been added to conf
.
+ * @return 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
.
* @since 1.6.1 of librdkafka
* @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a809061ceda162f8d8ad9663cabf66b3d
*/
@@ -5633,8 +5660,7 @@ public static function rd_kafka_CreateAcls(?\FFI\CData $rk, ?\FFI\CData $new_acl
/**
* 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.
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)
.
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.
+ *Get the id of node
.
Get the host of node
.
node
object. Get the port of node
.
Returns a name for a state code.
+ * @param int $state rd_kafka_consumer_group_state_t - ) - The state value. + * @return string|null const char* - The group state name corresponding to the provided group state value. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#aa9e2cac6e414980eef365394d06014f4 */ public static function rd_kafka_consumer_group_state_name(int $state): ?string { @@ -5788,9 +5835,11 @@ public static function rd_kafka_consumer_group_state_name(int $state): ?string } /** - * @param string|null $name const char* - * @return int rd_kafka_consumer_group_state_t + *Returns a code for a state name.
+ * @param string|null $name const char* - ) - The state name. + * @return int rd_kafka_consumer_group_state_t - The group state value corresponding to the provided group state name. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a5d7d4a9967f81749cf8bd2b898021d80 */ public static function rd_kafka_consumer_group_state_code(?string $name): int { @@ -5798,9 +5847,14 @@ public static function rd_kafka_consumer_group_state_code(?string $name): int } /** - * @param \FFI\CData|null $rkev rd_kafka_event_t* - * @return \FFI\CData|null const rd_kafka_ListConsumerGroups_result_t* + *Get ListConsumerGroups result.
+ * + *rkev
object.Event types: RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_ListConsumerGroups_result_t* - the result of a ListConsumerGroups request, or NULL if event is of different type. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ae98a40da574c542788d195ac8a0413e6 */ public static function rd_kafka_event_ListConsumerGroups_result(?\FFI\CData $rkev): ?\FFI\CData { @@ -5808,9 +5862,14 @@ public static function rd_kafka_event_ListConsumerGroups_result(?\FFI\CData $rke } /** - * @param \FFI\CData|null $rkev rd_kafka_event_t* - * @return \FFI\CData|null const rd_kafka_DescribeConsumerGroups_result_t* + *Get DescribeConsumerGroups result.
+ * + *rkev
object.Event types: RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_DescribeConsumerGroups_result_t* - the result of a DescribeConsumerGroups request, or NULL if event is of different type. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a1c6a620b55cb4c6acbc48c273d334b16 */ public static function rd_kafka_event_DescribeConsumerGroups_result(?\FFI\CData $rkev): ?\FFI\CData { @@ -5818,9 +5877,14 @@ public static function rd_kafka_event_DescribeConsumerGroups_result(?\FFI\CData } /** - * @param \FFI\CData|null $rkev rd_kafka_event_t* - * @return \FFI\CData|null const rd_kafka_AlterConsumerGroupOffsets_result_t* + *Get AlterConsumerGroupOffsets result.
+ * + *rkev
object.Event types: RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_AlterConsumerGroupOffsets_result_t* - the result of a AlterConsumerGroupOffsets request, or NULL if event is of different type. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#aac08437e5b1361291f93b7428b4b1275 */ public static function rd_kafka_event_AlterConsumerGroupOffsets_result(?\FFI\CData $rkev): ?\FFI\CData { @@ -5828,9 +5892,14 @@ public static function rd_kafka_event_AlterConsumerGroupOffsets_result(?\FFI\CDa } /** - * @param \FFI\CData|null $rkev rd_kafka_event_t* - * @return \FFI\CData|null const rd_kafka_ListConsumerGroupOffsets_result_t* + *Get ListConsumerGroupOffsets result.
+ * + *rkev
object.Event types: RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_ListConsumerGroupOffsets_result_t* - the result of a ListConsumerGroupOffsets request, or NULL if event is of different type. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ac24d4e077500b38974634f63758aae7e */ public static function rd_kafka_event_ListConsumerGroupOffsets_result(?\FFI\CData $rkev): ?\FFI\CData { @@ -5838,15 +5907,17 @@ public static function rd_kafka_event_ListConsumerGroupOffsets_result(?\FFI\CDat } /** - * @param \FFI\CData|null $rk rd_kafka_t* - * @param int|null $broker_id int32_t - * @param string|null $secproto const char* - * @param string|null $name const char* - * @param int|null $port int - * @param string|null $state const char* - * @param \FFI\CData|object|string|null $ic_opaque void* - * @return int rd_kafka_resp_err_t + *on_broker_state_change() is called just after a broker has been created or its state has been changed.
+ * @param \FFI\CData|null $rk rd_kafka_t* - The client instance. + * @param int|null $broker_id int32_t - The broker id (-1 is used for bootstrap brokers). + * @param string|null $secproto const char* - The security protocol. + * @param string|null $name const char* - The original name of the broker. + * @param int|null $port int - The port of the broker. + * @param string|null $state const char* - Broker state name. + * @param \FFI\CData|object|string|null $ic_opaque void* - The interceptor's opaque pointer specified in ..add..(). + * @return int rd_kafka_resp_err_t - an error code on failure, the error is logged but otherwise ignored. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a50cb62229f969ac9d25d58c8d65950b9 */ public static function rd_kafka_interceptor_f_on_broker_state_change_t(?\FFI\CData $rk, ?int $broker_id, ?string $secproto, ?string $name, ?int $port, ?string $state, $ic_opaque): int { @@ -5854,12 +5925,14 @@ public static function rd_kafka_interceptor_f_on_broker_state_change_t(?\FFI\CDa } /** - * @param \FFI\CData|null $rk rd_kafka_t* - * @param string|null $ic_name const char* + *Append an on_broker_state_change() interceptor.
+ * @param \FFI\CData|null $rk rd_kafka_t* - Client instance. + * @param string|null $ic_name const char* - Interceptor name, used in logging. * @param \FFI\CData|\Closure $on_broker_state_change 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*) - * @param \FFI\CData|object|string|null $ic_opaque void* - * @return int rd_kafka_resp_err_t + * @param \FFI\CData|object|string|null $ic_opaque void* - Opaque value that will be passed to the function. + * @return 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 sameic_name
and function has already been added to conf
.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a2b53e29ee63067884bc8962e8637e82b
*/
public static function rd_kafka_interceptor_add_on_broker_state_change(?\FFI\CData $rk, ?string $ic_name, $on_broker_state_change, $ic_opaque): int
{
@@ -5867,10 +5940,15 @@ public static function rd_kafka_interceptor_add_on_broker_state_change(?\FFI\CDa
}
/**
- * @param \FFI\CData|null $options rd_kafka_AdminOptions_t*
- * @param int|null $true_or_false int
- * @return \FFI\CData|null rd_kafka_error_t*
+ * Whether broker should return stable offsets (transaction-committed).
+ * + * + *Set consumer groups states to query for.
+ * + * + *consumer_group_states
array.
+ * @return \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.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a907d23eac09352f32321e9d0140caab1
*/
public static function rd_kafka_AdminOptions_set_match_consumer_group_states(?\FFI\CData $options, ?\FFI\CData $consumer_group_states, ?int $consumer_group_states_cnt): ?\FFI\CData
{
@@ -5890,10 +5973,14 @@ public static function rd_kafka_AdminOptions_set_match_consumer_group_states(?\F
}
/**
- * @param \FFI\CData|null $rk rd_kafka_t*
- * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t*
- * @param \FFI\CData|null $rkqu rd_kafka_queue_t*
+ * List the consumer groups available in the cluster.
+ * + *RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT
Gets the group id for the grplist
group.
grplist
object. Is the grplist
group a simple consumer group.
Gets state for the grplist
group.
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. Get an array of errors from a ListConsumerGroups call result.
+ *The returned errors life-time is the same as the result
object.
result
object. result
.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a0d1251b00ea55f8bd652c7a056c11425
*/
public static function rd_kafka_ListConsumerGroups_result_errors(?\FFI\CData $result, ?\FFI\CData $cntp): ?\FFI\CData
{
@@ -5953,12 +6060,16 @@ public static function rd_kafka_ListConsumerGroups_result_errors(?\FFI\CData $re
}
/**
- * @param \FFI\CData|null $rk rd_kafka_t*
- * @param \FFI\CData|null $groups const char**
- * @param int|null $groups_cnt size_t
- * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t*
- * @param \FFI\CData|null $rkqu rd_kafka_queue_t*
+ * Describe groups from cluster as specified by the groups
array of size groups_cnt
elements.
RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT
groups
array.
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t* - Queue to emit result on.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a3c473e95da2231aaaeca990a6ff45ad1
*/
public static function rd_kafka_DescribeConsumerGroups(?\FFI\CData $rk, ?\FFI\CData $groups, ?int $groups_cnt, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
{
@@ -5966,10 +6077,15 @@ public static function rd_kafka_DescribeConsumerGroups(?\FFI\CData $rk, ?\FFI\CD
}
/**
- * @param \FFI\CData|null $result const rd_kafka_DescribeConsumerGroups_result_t*
- * @param \FFI\CData|null $cntp size_t*
+ * Get an array of group results from a DescribeConsumerGroups result.
+ *The returned groups life-time is the same as the result
object.
result
object. Gets the group id for the grpdesc
group.
grpdesc
object. Gets the error for the grpdesc
group.
grpdesc
object. Is the grpdesc
group a simple consumer group.
Gets the partition assignor for the grpdesc
group.
grpdesc
object. Gets state for the grpdesc
group.
Gets the coordinator for the grpdesc
group.
grpdesc
object. Gets the members count of grpdesc
group.
Gets a member of grpdesc
group.
grpdesc
object. idx
, or NULL if idx
is out of range.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a7bdfd0d42f52fb3d8d58aca660ef36b0
*/
public static function rd_kafka_ConsumerGroupDescription_member(?\FFI\CData $grpdesc, ?int $idx): ?\FFI\CData
{
@@ -6058,9 +6205,14 @@ public static function rd_kafka_ConsumerGroupDescription_member(?\FFI\CData $grp
}
/**
- * @param \FFI\CData|null $member const rd_kafka_MemberDescription_t*
- * @return string|null const char*
+ * Gets client id of member
.
member
object. Gets group instance id of member
.
member
object. Gets consumer id of member
.
member
object. Gets host of member
.
member
object. Gets assignment of member
.
member
object. Gets assigned partitions of a member assignment
.
assignment
object. Create a new ListConsumerGroupOffsets object. This object is later passed to rd_kafka_ListConsumerGroupOffsets().
+ * @param string|null $group_id const char* - Consumer group id. + * @param \FFI\CData|null $partitions const rd_kafka_topic_partition_list_t* - Partitions to list committed offsets for. Only the topic and partition fields are used. + * @return \FFI\CData|null rd_kafka_ListConsumerGroupOffsets_t* - a new allocated ListConsumerGroupOffsets object. Use rd_kafka_ListConsumerGroupOffsets_destroy() to free object when done. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#af96cc3e1031d498fdf46f5590d8a7ea2 */ public static function rd_kafka_ListConsumerGroupOffsets_new(?string $group_id, ?\FFI\CData $partitions): ?\FFI\CData { @@ -6148,12 +6327,18 @@ public static function rd_kafka_ListConsumerGroupOffsets_destroy_array(?\FFI\CDa } /** - * @param \FFI\CData|null $rk rd_kafka_t* - * @param \FFI\CData|null $list_grpoffsets rd_kafka_ListConsumerGroupOffsets_t** - * @param int|null $list_grpoffsets_cnt size_t - * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - * @param \FFI\CData|null $rkqu rd_kafka_queue_t* + *List committed offsets for a set of partitions in a consumer group.
+ * + *RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT
list_grpoffsets
array. MUST always be 1.
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t* - Queue to emit result on.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ab51163573f8a19f0ec240428fd8fca3e
*/
public static function rd_kafka_ListConsumerGroupOffsets(?\FFI\CData $rk, ?\FFI\CData $list_grpoffsets, ?int $list_grpoffsets_cnt, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
{
@@ -6161,10 +6346,15 @@ public static function rd_kafka_ListConsumerGroupOffsets(?\FFI\CData $rk, ?\FFI\
}
/**
- * @param \FFI\CData|null $result const rd_kafka_ListConsumerGroupOffsets_result_t*
- * @param \FFI\CData|null $cntp size_t*
+ * Get an array of results from a ListConsumerGroupOffsets result.
+ *The returned groups life-time is the same as the result
object.
result
object. Create a new AlterConsumerGroupOffsets object. This object is later passed to rd_kafka_AlterConsumerGroupOffsets().
+ * @param string|null $group_id const char* - Consumer group id. + * @param \FFI\CData|null $partitions const rd_kafka_topic_partition_list_t* - Partitions to alter committed offsets for. Only the topic and partition fields are used. + * @return \FFI\CData|null rd_kafka_AlterConsumerGroupOffsets_t* - a new allocated AlterConsumerGroupOffsets object. Use rd_kafka_AlterConsumerGroupOffsets_destroy() to free object when done. * @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#aa04df04ed898431c1d85e57e9dfb020e */ public static function rd_kafka_AlterConsumerGroupOffsets_new(?string $group_id, ?\FFI\CData $partitions): ?\FFI\CData { @@ -6202,12 +6394,18 @@ public static function rd_kafka_AlterConsumerGroupOffsets_destroy_array(?\FFI\CD } /** - * @param \FFI\CData|null $rk rd_kafka_t* - * @param \FFI\CData|null $alter_grpoffsets rd_kafka_AlterConsumerGroupOffsets_t** - * @param int|null $alter_grpoffsets_cnt size_t - * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - * @param \FFI\CData|null $rkqu rd_kafka_queue_t* + *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
alter_grpoffsets
array. MUST always be 1.
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t* - Queue to emit result on.
* @since 2.0.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a3bebec377020469583f6c8e2f0b06ec8
*/
public static function rd_kafka_AlterConsumerGroupOffsets(?\FFI\CData $rk, ?\FFI\CData $alter_grpoffsets, ?int $alter_grpoffsets_cnt, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
{
@@ -6215,10 +6413,15 @@ public static function rd_kafka_AlterConsumerGroupOffsets(?\FFI\CData $rk, ?\FFI
}
/**
- * @param \FFI\CData|null $result const rd_kafka_AlterConsumerGroupOffsets_result_t*
- * @param \FFI\CData|null $cntp size_t*
+ * Get an array of results from a AlterConsumerGroupOffsets result.
+ *The returned groups life-time is the same as the result
object.
result
object. Sets the offset leader epoch (use -1 to clear).
+ * + *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.Get IncrementalAlterConfigs result.
+ * + *Event types: RD_KAFKA_EVENT_INCREMENTALALTERCONFIGS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_IncrementalAlterConfigs_result_t* - the result of a IncrementalAlterConfigs request, or NULL if event is of different type. + * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8e76c2d637218310d8868af31649b97a + */ + public static function rd_kafka_event_IncrementalAlterConfigs_result(?\FFI\CData $rkev): ?\FFI\CData + { + return static::getFFI()->rd_kafka_event_IncrementalAlterConfigs_result($rkev); + } + + /** + *Get DescribeUserScramCredentials result.
+ * + *rkev
object.Event types: RD_KAFKA_EVENT_DESCRIBEUSERSCRAMCREDENTIALS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_DescribeUserScramCredentials_result_t* - the result of a DescribeUserScramCredentials request, or NULL if event is of different type. + * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a69853c3d64324a45341b2a68b0e2026e + */ + public static function rd_kafka_event_DescribeUserScramCredentials_result(?\FFI\CData $rkev): ?\FFI\CData + { + return static::getFFI()->rd_kafka_event_DescribeUserScramCredentials_result($rkev); + } + + /** + *Get AlterUserScramCredentials result.
+ * + *rkev
object.Event types: RD_KAFKA_EVENT_ALTERUSERSCRAMCREDENTIALS_RESULT
+ * @param \FFI\CData|null $rkev rd_kafka_event_t* - ) + * @return \FFI\CData|null const rd_kafka_AlterUserScramCredentials_result_t* - the result of a AlterUserScramCredentials request, or NULL if event is of different type. + * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#abb9995f278c3eaf8e4bc6caba254ba0a + */ + public static function rd_kafka_event_AlterUserScramCredentials_result(?\FFI\CData $rkev): ?\FFI\CData + { + return static::getFFI()->rd_kafka_event_AlterUserScramCredentials_result($rkev); + } + + /** + *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.
+ * @param \FFI\CData|null $config rd_kafka_ConfigResource_t* - ConfigResource to add config property to. + * @param string|null $name const char* - Configuration name, depends on resource type. + * @param int $op_type rd_kafka_AlterConfigOpType_t - Operation type, one of rd_kafka_AlterConfigOpType_t. + * @param string|null $value const char* - Configuration value, depends on resource type andname
. Set to NULL
, only with with op_type set to DELETE, to revert configuration value to default.
+ * @return \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: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.configs
array.
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t* - Queue to emit result on.
+ * @since 2.2.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a36805ba8496fed43f6e87421c259804b
+ */
+ public static function rd_kafka_IncrementalAlterConfigs(?\FFI\CData $rk, ?\FFI\CData $configs, ?int $config_cnt, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
+ {
+ static::getFFI()->rd_kafka_IncrementalAlterConfigs($rk, $configs, $config_cnt, $options, $rkqu);
+ }
+
+ /**
+ * 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.
Get an array of descriptions from a DescribeUserScramCredentials result.
+ *The returned value life-time is the same as the result
object.
Describe SASL/SCRAM credentials. This operation is supported by brokers with version 2.7.0 or higher.
+ * @param \FFI\CData|null $rk rd_kafka_t* - Client instance. + * @param \FFI\CData|null $users const char** - The users for which credentials are to be described. All users' credentials are described if NULL. + * @param int|null $user_cnt size_t - Number of elements inusers
array.
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t* - Queue to emit result on.
+ * @since 2.2.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ac9d2f72dd1dddce0c7d24a4e413b3cf5
+ */
+ public static function rd_kafka_DescribeUserScramCredentials(?\FFI\CData $rk, ?\FFI\CData $users, ?int $user_cnt, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
+ {
+ static::getFFI()->rd_kafka_DescribeUserScramCredentials($rk, $users, $user_cnt, $options, $rkqu);
+ }
+
+ /**
+ * 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.
+ * + *password
(greater than 0).
+ * @param \FFI\CData|null $salt const unsigned char* - Salt bytes (optional).
+ * @param int|null $salt_size size_t - Size of salt
(optional).
+ * @return \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.
+ * @since 2.2.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ae1707143331cd5b798d25cb8df33df5f
+ */
+ public static function rd_kafka_UserScramCredentialUpsertion_new(?string $username, int $mechanism, ?int $iterations, ?\FFI\CData $password, ?int $password_size, ?\FFI\CData $salt, ?int $salt_size): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_UserScramCredentialUpsertion_new($username, $mechanism, $iterations, $password, $password_size, $salt, $salt_size);
+ }
+
+ /**
+ * Allocates a new UserScramCredentialDeletion given its fields.
+ * @param string|null $username const char* - The username (not empty). + * @param int $mechanism rd_kafka_ScramMechanism_t - SASL/SCRAM mechanism. + * @return \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. + * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a89e57d12d9415354fcbbf1d7b0072db2 + */ + public static function rd_kafka_UserScramCredentialDeletion_new(?string $username, int $mechanism): ?\FFI\CData + { + return static::getFFI()->rd_kafka_UserScramCredentialDeletion_new($username, $mechanism); + } + + /** + * @param \FFI\CData|null $alteration rd_kafka_UserScramCredentialAlteration_t* + * @since 2.2.0 of librdkafka + */ + public static function rd_kafka_UserScramCredentialAlteration_destroy(?\FFI\CData $alteration): void + { + static::getFFI()->rd_kafka_UserScramCredentialAlteration_destroy($alteration); + } + + /** + * @param \FFI\CData|null $alterations rd_kafka_UserScramCredentialAlteration_t** + * @param int|null $alteration_cnt size_t + * @since 2.2.0 of librdkafka + */ + public static function rd_kafka_UserScramCredentialAlteration_destroy_array(?\FFI\CData $alterations, ?int $alteration_cnt): void + { + static::getFFI()->rd_kafka_UserScramCredentialAlteration_destroy_array($alterations, $alteration_cnt); + } + + /** + * @param \FFI\CData|null $response const rd_kafka_AlterUserScramCredentials_result_response_t* + * @return string|null const char* + * @since 2.2.0 of librdkafka + */ + public static function rd_kafka_AlterUserScramCredentials_result_response_user(?\FFI\CData $response): ?string + { + return static::getFFI()->rd_kafka_AlterUserScramCredentials_result_response_user($response); + } + + /** + * @param \FFI\CData|null $response const rd_kafka_AlterUserScramCredentials_result_response_t* + * @return \FFI\CData|null const rd_kafka_error_t* + * @since 2.2.0 of librdkafka + */ + public static function rd_kafka_AlterUserScramCredentials_result_response_error(?\FFI\CData $response): ?\FFI\CData + { + return static::getFFI()->rd_kafka_AlterUserScramCredentials_result_response_error($response); + } + + /** + *Get an array of responses from a AlterUserScramCredentials result.
+ *The returned value life-time is the same as the result
object.
Alter SASL/SCRAM credentials. This operation is supported by brokers with version 2.7.0 or higher.
+ *alterations
array.
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t* - Optional admin options, or NULL for defaults.
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t* - Queue to emit result on.
+ * @since 2.2.0 of librdkafka
+ * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ab02fa9f8f192f78c1ffb0111b0f5cb2f
+ */
+ public static function rd_kafka_AlterUserScramCredentials(?\FFI\CData $rk, ?\FFI\CData $alterations, ?int $alteration_cnt, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
+ {
+ static::getFFI()->rd_kafka_AlterUserScramCredentials($rk, $alterations, $alteration_cnt, $options, $rkqu);
+ }
+
+ /**
+ * @param \FFI\CData|null $uuid const rd_kafka_Uuid_t*
+ * @return string|null const char*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Uuid_base64str(?\FFI\CData $uuid): ?string
+ {
+ return static::getFFI()->rd_kafka_Uuid_base64str($uuid);
+ }
+
+ /**
+ * @param \FFI\CData|null $uuid const rd_kafka_Uuid_t*
+ * @return int|null int64_t
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Uuid_least_significant_bits(?\FFI\CData $uuid): ?int
+ {
+ return static::getFFI()->rd_kafka_Uuid_least_significant_bits($uuid);
+ }
+
+ /**
+ * @param \FFI\CData|null $uuid const rd_kafka_Uuid_t*
+ * @return int|null int64_t
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Uuid_most_significant_bits(?\FFI\CData $uuid): ?int
+ {
+ return static::getFFI()->rd_kafka_Uuid_most_significant_bits($uuid);
+ }
+
+ /**
+ * @param int|null $most_significant_bits int64_t
+ * @param int|null $least_significant_bits int64_t
+ * @return \FFI\CData|null rd_kafka_Uuid_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Uuid_new(?int $most_significant_bits, ?int $least_significant_bits): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_Uuid_new($most_significant_bits, $least_significant_bits);
+ }
+
+ /**
+ * @param \FFI\CData|null $uuid const rd_kafka_Uuid_t*
+ * @return \FFI\CData|null rd_kafka_Uuid_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Uuid_copy(?\FFI\CData $uuid): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_Uuid_copy($uuid);
+ }
+
+ /**
+ * @param \FFI\CData|null $uuid rd_kafka_Uuid_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Uuid_destroy(?\FFI\CData $uuid): void
+ {
+ static::getFFI()->rd_kafka_Uuid_destroy($uuid);
+ }
+
+ /**
+ * @param \FFI\CData|null $node const rd_kafka_Node_t*
+ * @return string|null const char*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_Node_rack(?\FFI\CData $node): ?string
+ {
+ return static::getFFI()->rd_kafka_Node_rack($node);
+ }
+
+ /**
+ * @param \FFI\CData|null $rkev rd_kafka_event_t*
+ * @return \FFI\CData|null const rd_kafka_DescribeTopics_result_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_event_DescribeTopics_result(?\FFI\CData $rkev): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_event_DescribeTopics_result($rkev);
+ }
+
+ /**
+ * @param \FFI\CData|null $rkev rd_kafka_event_t*
+ * @return \FFI\CData|null const rd_kafka_DescribeCluster_result_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_event_DescribeCluster_result(?\FFI\CData $rkev): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_event_DescribeCluster_result($rkev);
+ }
+
+ /**
+ * @param \FFI\CData|null $rkev rd_kafka_event_t*
+ * @return \FFI\CData|null const rd_kafka_ListOffsets_result_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_event_ListOffsets_result(?\FFI\CData $rkev): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_event_ListOffsets_result($rkev);
+ }
+
+ /**
+ * @param \FFI\CData|null $options rd_kafka_AdminOptions_t*
+ * @param int|null $true_or_false int
+ * @return \FFI\CData|null rd_kafka_error_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_AdminOptions_set_include_authorized_operations(?\FFI\CData $options, ?int $true_or_false): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_AdminOptions_set_include_authorized_operations($options, $true_or_false);
+ }
+
+ /**
+ * @param \FFI\CData|null $options rd_kafka_AdminOptions_t*
+ * @param int $value rd_kafka_IsolationLevel_t
+ * @return \FFI\CData|null rd_kafka_error_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_AdminOptions_set_isolation_level(?\FFI\CData $options, int $value): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_AdminOptions_set_isolation_level($options, $value);
+ }
+
+ /**
+ * @param \FFI\CData|null $topics const char**
+ * @param int|null $topics_cnt size_t
+ * @return \FFI\CData|null rd_kafka_TopicCollection_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicCollection_of_topic_names(?\FFI\CData $topics, ?int $topics_cnt): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicCollection_of_topic_names($topics, $topics_cnt);
+ }
+
+ /**
+ * @param \FFI\CData|null $topics rd_kafka_TopicCollection_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicCollection_destroy(?\FFI\CData $topics): void
+ {
+ static::getFFI()->rd_kafka_TopicCollection_destroy($topics);
+ }
+
+ /**
+ * @param \FFI\CData|null $rk rd_kafka_t*
+ * @param \FFI\CData|null $topics const rd_kafka_TopicCollection_t*
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t*
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeTopics(?\FFI\CData $rk, ?\FFI\CData $topics, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
+ {
+ static::getFFI()->rd_kafka_DescribeTopics($rk, $topics, $options, $rkqu);
+ }
+
+ /**
+ * @param \FFI\CData|null $result const rd_kafka_DescribeTopics_result_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_TopicDescription_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeTopics_result_topics(?\FFI\CData $result, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_DescribeTopics_result_topics($result, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $topicdesc const rd_kafka_TopicDescription_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_TopicPartitionInfo_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicDescription_partitions(?\FFI\CData $topicdesc, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicDescription_partitions($topicdesc, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $partition const rd_kafka_TopicPartitionInfo_t*
+ * @return int|null const int
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicPartitionInfo_partition(?\FFI\CData $partition): ?int
+ {
+ return static::getFFI()->rd_kafka_TopicPartitionInfo_partition($partition);
+ }
+
+ /**
+ * @param \FFI\CData|null $partition const rd_kafka_TopicPartitionInfo_t*
+ * @return \FFI\CData|null const rd_kafka_Node_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicPartitionInfo_leader(?\FFI\CData $partition): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicPartitionInfo_leader($partition);
+ }
+
+ /**
+ * @param \FFI\CData|null $partition const rd_kafka_TopicPartitionInfo_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_Node_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicPartitionInfo_isr(?\FFI\CData $partition, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicPartitionInfo_isr($partition, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $partition const rd_kafka_TopicPartitionInfo_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_Node_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicPartitionInfo_replicas(?\FFI\CData $partition, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicPartitionInfo_replicas($partition, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $topicdesc const rd_kafka_TopicDescription_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_AclOperation_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicDescription_authorized_operations(?\FFI\CData $topicdesc, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicDescription_authorized_operations($topicdesc, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $topicdesc const rd_kafka_TopicDescription_t*
+ * @return string|null const char*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicDescription_name(?\FFI\CData $topicdesc): ?string
+ {
+ return static::getFFI()->rd_kafka_TopicDescription_name($topicdesc);
+ }
+
+ /**
+ * @param \FFI\CData|null $topicdesc const rd_kafka_TopicDescription_t*
+ * @return \FFI\CData|null const rd_kafka_Uuid_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicDescription_topic_id(?\FFI\CData $topicdesc): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicDescription_topic_id($topicdesc);
+ }
+
+ /**
+ * @param \FFI\CData|null $topicdesc const rd_kafka_TopicDescription_t*
+ * @return int|null int
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicDescription_is_internal(?\FFI\CData $topicdesc): ?int
+ {
+ return static::getFFI()->rd_kafka_TopicDescription_is_internal($topicdesc);
+ }
+
+ /**
+ * @param \FFI\CData|null $topicdesc const rd_kafka_TopicDescription_t*
+ * @return \FFI\CData|null const rd_kafka_error_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_TopicDescription_error(?\FFI\CData $topicdesc): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_TopicDescription_error($topicdesc);
+ }
+
+ /**
+ * @param \FFI\CData|null $rk rd_kafka_t*
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t*
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeCluster(?\FFI\CData $rk, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
+ {
+ static::getFFI()->rd_kafka_DescribeCluster($rk, $options, $rkqu);
+ }
+
+ /**
+ * @param \FFI\CData|null $result const rd_kafka_DescribeCluster_result_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_Node_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeCluster_result_nodes(?\FFI\CData $result, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_DescribeCluster_result_nodes($result, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $result const rd_kafka_DescribeCluster_result_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_AclOperation_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeCluster_result_authorized_operations(?\FFI\CData $result, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_DescribeCluster_result_authorized_operations($result, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $result const rd_kafka_DescribeCluster_result_t*
+ * @return \FFI\CData|null const rd_kafka_Node_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeCluster_result_controller(?\FFI\CData $result): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_DescribeCluster_result_controller($result);
+ }
+
+ /**
+ * @param \FFI\CData|null $result const rd_kafka_DescribeCluster_result_t*
+ * @return string|null const char*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_DescribeCluster_result_cluster_id(?\FFI\CData $result): ?string
+ {
+ return static::getFFI()->rd_kafka_DescribeCluster_result_cluster_id($result);
+ }
+
+ /**
+ * @param \FFI\CData|null $grpdesc const rd_kafka_ConsumerGroupDescription_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_AclOperation_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_ConsumerGroupDescription_authorized_operations(?\FFI\CData $grpdesc, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_ConsumerGroupDescription_authorized_operations($grpdesc, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $result_info const rd_kafka_ListOffsetsResultInfo_t*
+ * @return \FFI\CData|null const rd_kafka_topic_partition_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_ListOffsetsResultInfo_topic_partition(?\FFI\CData $result_info): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_ListOffsetsResultInfo_topic_partition($result_info);
+ }
+
+ /**
+ * @param \FFI\CData|null $result_info const rd_kafka_ListOffsetsResultInfo_t*
+ * @return int|null int64_t
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_ListOffsetsResultInfo_timestamp(?\FFI\CData $result_info): ?int
+ {
+ return static::getFFI()->rd_kafka_ListOffsetsResultInfo_timestamp($result_info);
+ }
+
+ /**
+ * @param \FFI\CData|null $result const rd_kafka_ListOffsets_result_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null const rd_kafka_ListOffsetsResultInfo_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_ListOffsets_result_infos(?\FFI\CData $result, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_ListOffsets_result_infos($result, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $rk rd_kafka_t*
+ * @param \FFI\CData|null $topic_partitions rd_kafka_topic_partition_list_t*
+ * @param \FFI\CData|null $options const rd_kafka_AdminOptions_t*
+ * @param \FFI\CData|null $rkqu rd_kafka_queue_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_ListOffsets(?\FFI\CData $rk, ?\FFI\CData $topic_partitions, ?\FFI\CData $options, ?\FFI\CData $rkqu): void
+ {
+ static::getFFI()->rd_kafka_ListOffsets($rk, $topic_partitions, $options, $rkqu);
+ }
+
+ /**
+ * @param \FFI\CData|null $mcluster rd_kafka_mock_cluster_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_start_request_tracking(?\FFI\CData $mcluster): void
+ {
+ static::getFFI()->rd_kafka_mock_start_request_tracking($mcluster);
+ }
+
+ /**
+ * @param \FFI\CData|null $mcluster rd_kafka_mock_cluster_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_stop_request_tracking(?\FFI\CData $mcluster): void
+ {
+ static::getFFI()->rd_kafka_mock_stop_request_tracking($mcluster);
+ }
+
+ /**
+ * @param \FFI\CData|null $mreq rd_kafka_mock_request_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_request_destroy(?\FFI\CData $mreq): void
+ {
+ static::getFFI()->rd_kafka_mock_request_destroy($mreq);
+ }
+
+ /**
+ * @param \FFI\CData|null $mreq rd_kafka_mock_request_t*
+ * @return int|null int32_t
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_request_id(?\FFI\CData $mreq): ?int
+ {
+ return static::getFFI()->rd_kafka_mock_request_id($mreq);
+ }
+
+ /**
+ * @param \FFI\CData|null $mreq rd_kafka_mock_request_t*
+ * @return int|null int16_t
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_request_api_key(?\FFI\CData $mreq): ?int
+ {
+ return static::getFFI()->rd_kafka_mock_request_api_key($mreq);
+ }
+
+ /**
+ * @param \FFI\CData|null $mreq rd_kafka_mock_request_t*
+ * @return int|null int64_t
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_request_timestamp(?\FFI\CData $mreq): ?int
+ {
+ return static::getFFI()->rd_kafka_mock_request_timestamp($mreq);
+ }
+
+ /**
+ * @param \FFI\CData|null $mcluster rd_kafka_mock_cluster_t*
+ * @param \FFI\CData|null $cntp size_t*
+ * @return \FFI\CData|null rd_kafka_mock_request_t**
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_get_requests(?\FFI\CData $mcluster, ?\FFI\CData $cntp): ?\FFI\CData
+ {
+ return static::getFFI()->rd_kafka_mock_get_requests($mcluster, $cntp);
+ }
+
+ /**
+ * @param \FFI\CData|null $mcluster rd_kafka_mock_cluster_t*
+ * @since 2.3.0 of librdkafka
+ */
+ public static function rd_kafka_mock_clear_requests(?\FFI\CData $mcluster): void
+ {
+ static::getFFI()->rd_kafka_mock_clear_requests($mcluster);
+ }
}
diff --git a/src/RdKafka/FFI/OpaqueMap.php b/src/RdKafka/FFI/OpaqueMap.php
index c59523d3..bdff056c 100644
--- a/src/RdKafka/FFI/OpaqueMap.php
+++ b/src/RdKafka/FFI/OpaqueMap.php
@@ -25,13 +25,13 @@ public static function push($opaque): ?CData
}
self::$nextId++;
- if (self::$nextId === PHP_INT_MAX) {
+ if (self::$nextId > 4294967295) {
self::$nextId = 1;
}
self::$map[self::$nextId] = $opaque;
- $cOpaque = \FFI::new('int');
+ $cOpaque = Library::new('unsigned int');
$cOpaque->cdata = self::$nextId;
self::$cMap[self::$nextId] = $cOpaque;
@@ -47,7 +47,7 @@ public static function pull(?CData $cOpaque)
return null;
}
- $cOpaque = \FFI::cast('int', $cOpaque);
+ $cOpaque = Library::cast('unsigned int', $cOpaque);
$id = $cOpaque->cdata;
if (array_key_exists($id, self::$map) === false) {
@@ -71,7 +71,7 @@ public static function get(?CData $cOpaque)
return null;
}
- $cOpaque = \FFI::cast('int', $cOpaque);
+ $cOpaque = Library::cast('unsigned int', $cOpaque);
$id = $cOpaque->cdata;
if (array_key_exists($id, self::$map) === false) {
diff --git a/src/RdKafka/FFI/Versions/2.1.0.php b/src/RdKafka/FFI/Versions/2.1.0.php
new file mode 100644
index 00000000..62032ebb
--- /dev/null
+++ b/src/RdKafka/FFI/Versions/2.1.0.php
@@ -0,0 +1,929 @@
+librdkafka version
+ * Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
Unsupported compression type
+ * @since 2.1.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a03509bab51072c72a8dcf52337e6d5cb + */ +const RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76; + +/** + * enum rd_kafka_resp_err_t + * @since 2.1.0 of librdkafka + */ +const RD_KAFKA_RESP_ERR_END_ALL = 98; + +/** + *Number of ops defined
+ * @since 2.1.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP__CNT = 16; + +/** + * rdkafka.h, rdkafka_mock.h + * @since 2.1.0 of librdkafka + */ +const 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); +'; diff --git a/src/RdKafka/FFI/Versions/2.1.1.php b/src/RdKafka/FFI/Versions/2.1.1.php new file mode 100644 index 00000000..76ee0925 --- /dev/null +++ b/src/RdKafka/FFI/Versions/2.1.1.php @@ -0,0 +1,929 @@ +librdkafka version + *Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
Unsupported compression type
+ * @since 2.1.1 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a03509bab51072c72a8dcf52337e6d5cb + */ +const RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76; + +/** + * enum rd_kafka_resp_err_t + * @since 2.1.1 of librdkafka + */ +const RD_KAFKA_RESP_ERR_END_ALL = 98; + +/** + *Number of ops defined
+ * @since 2.1.1 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP__CNT = 16; + +/** + * rdkafka.h, rdkafka_mock.h + * @since 2.1.1 of librdkafka + */ +const 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); +'; diff --git a/src/RdKafka/FFI/Versions/2.2.0.php b/src/RdKafka/FFI/Versions/2.2.0.php new file mode 100644 index 00000000..18de2027 --- /dev/null +++ b/src/RdKafka/FFI/Versions/2.2.0.php @@ -0,0 +1,974 @@ +librdkafka version + *Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
Unsupported compression type
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a03509bab51072c72a8dcf52337e6d5cb + */ +const RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76; + +/** + * enum rd_kafka_resp_err_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_RESP_ERR_END_ALL = 98; + +/** + *Number of ops defined
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP__CNT = 19; + +/** + * rdkafka.h, rdkafka_mock.h + * @since 2.2.0 of librdkafka + */ +const 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); +'; diff --git a/src/RdKafka/FFI/Versions/2.3.0.php b/src/RdKafka/FFI/Versions/2.3.0.php new file mode 100644 index 00000000..2c5c578c --- /dev/null +++ b/src/RdKafka/FFI/Versions/2.3.0.php @@ -0,0 +1,1039 @@ +librdkafka version + *Interpreted as hex MM.mm.rr.xx
:
E.g.: 0x000801ff
= 0.8.1
Unsupported compression type
+ * @since 2.3.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a03509bab51072c72a8dcf52337e6d5cb + */ +const RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76; + +/** + * enum rd_kafka_resp_err_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_RESP_ERR_END_ALL = 98; + +/** + *Number of ops defined
+ * @since 2.3.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP__CNT = 22; + +/** + * rdkafka.h, rdkafka_mock.h + * @since 2.3.0 of librdkafka + */ +const 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); +'; diff --git a/src/RdKafka/TopicPartitionList.php b/src/RdKafka/TopicPartitionList.php index 3cc01800..92b7d1dd 100644 --- a/src/RdKafka/TopicPartitionList.php +++ b/src/RdKafka/TopicPartitionList.php @@ -54,7 +54,7 @@ public function getCData(): CData $metadata = $item->getMetadata(); $metadataNative = Library::new('char[' . $item->getMetadataSize() . ']', false, true); FFI::memcpy($metadataNative, $metadata, $item->getMetadataSize()); - $nativeTopicPartition->metadata = FFI::cast('char*', $metadataNative); + $nativeTopicPartition->metadata = Library::cast('char*', $metadataNative); $nativeTopicPartition->metadata_size = $item->getMetadataSize(); } } diff --git a/src/constants.php b/src/constants.php index 68da6309..e6a02123 100644 --- a/src/constants.php +++ b/src/constants.php @@ -89,7 +89,7 @@ const RD_KAFKA_MSG_F_COPY = 2; /** - *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 indefinately blocking on \ the produce() call when the \ message queue is full.
+ *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.
* @since 1.0.0 of librdkafka * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#aca3cdf1c55668f4aa1c2391ddd39c9c2 */ @@ -687,7 +687,7 @@ /** *Not leader for partition
* @since 1.0.0 of librdkafka - * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a03509bab51072c72a8dcf52337e6d5cb + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ad4aa22eb292d320e5155c6cec9de4c43 */ const RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6; @@ -1993,26 +1993,30 @@ const RD_KAFKA_ACL_PERMISSION_TYPE__CNT = 4; /** - * define + *ListConsumerGroupsResult_t
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a7ba2a751aaf1dc30083f91d09b8a5d13 */ const RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT = 8192; /** - * define + *DescribeConsumerGroups_result_t
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a9f1efde95e9895a55407f2edc2a9dc35 */ const RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT = 16384; /** - * define + *ListConsumerGroupOffsets_result_t
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a04babfacd056e51968c5c3c4b5410f5f */ const RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT = 32768; /** - * define + *AlterConsumerGroupOffsets_result_t
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#af2b49b7fc3d4368c8cd24e78c31d275c */ const RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT = 65536; @@ -2059,1229 +2063,1402 @@ const RD_KAFKA_CONSUMER_GROUP_STATE__CNT = 6; /** - * enum rd_kafka_admin_op_t + *ListConsumerGroups
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe */ const RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS = 12; /** - * enum rd_kafka_admin_op_t + *DescribeConsumerGroups
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe */ const RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS = 13; /** - * enum rd_kafka_admin_op_t + *ListConsumerGroupOffsets
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe */ const RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS = 14; /** - * enum rd_kafka_admin_op_t + *AlterConsumerGroupOffsets
* @since 2.0.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe */ const RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS = 15; +/** + *Partition log truncation detected
+ * @since 2.1.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a03509bab51072c72a8dcf52337e6d5cb + */ +const RD_KAFKA_RESP_ERR__LOG_TRUNCATION = -139; + +/** + *IncrementalAlterConfigs_result_t
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#ab9388401d375ee75080814b9a1aff78c + */ +const RD_KAFKA_EVENT_INCREMENTALALTERCONFIGS_RESULT = 131072; + +/** + *DescribeUserScramCredentials_result_t
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a05a179e0165a01bfd72fd78163c465c1 + */ +const RD_KAFKA_EVENT_DESCRIBEUSERSCRAMCREDENTIALS_RESULT = 262144; + +/** + *AlterUserScramCredentials_result_t
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a11f6abfe27ffb6edcd184df41218f5cf + */ +const RD_KAFKA_EVENT_ALTERUSERSCRAMCREDENTIALS_RESULT = 524288; + +/** + *IncrementalAlterConfigs
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP_INCREMENTALALTERCONFIGS = 16; + +/** + *DescribeUserScramCredentials
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP_DESCRIBEUSERSCRAMCREDENTIALS = 17; + +/** + *AlterUserScramCredentials
+ * @since 2.2.0 of librdkafka + * @link https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#a8041b7c45068283d95f54ee14c7362fe + */ +const RD_KAFKA_ADMIN_OP_ALTERUSERSCRAMCREDENTIALS = 18; + +/** + * enum rd_kafka_AlterConfigOpType_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET = 0; + +/** + * enum rd_kafka_AlterConfigOpType_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE = 1; + +/** + * enum rd_kafka_AlterConfigOpType_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND = 2; + +/** + * enum rd_kafka_AlterConfigOpType_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT = 3; + +/** + * enum rd_kafka_AlterConfigOpType_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_ALTER_CONFIG_OP_TYPE__CNT = 4; + +/** + * enum rd_kafka_ScramMechanism_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_SCRAM_MECHANISM_UNKNOWN = 0; + +/** + * enum rd_kafka_ScramMechanism_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_SCRAM_MECHANISM_SHA_256 = 1; + +/** + * enum rd_kafka_ScramMechanism_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_SCRAM_MECHANISM_SHA_512 = 2; + +/** + * enum rd_kafka_ScramMechanism_t + * @since 2.2.0 of librdkafka + */ +const RD_KAFKA_SCRAM_MECHANISM__CNT = 3; + +/** + * define + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_EVENT_DESCRIBETOPICS_RESULT = 1048576; + +/** + * define + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_EVENT_DESCRIBECLUSTER_RESULT = 2097152; + +/** + * define + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_EVENT_LISTOFFSETS_RESULT = 4194304; + +/** + * enum rd_kafka_admin_op_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_ADMIN_OP_DESCRIBETOPICS = 19; + +/** + * enum rd_kafka_admin_op_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_ADMIN_OP_DESCRIBECLUSTER = 20; + +/** + * enum rd_kafka_admin_op_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_ADMIN_OP_LISTOFFSETS = 21; + +/** + * enum rd_kafka_IsolationLevel_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED = 0; + +/** + * enum rd_kafka_IsolationLevel_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED = 1; + +/** + * enum rd_kafka_OffsetSpec_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP = -3; + +/** + * enum rd_kafka_OffsetSpec_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_OFFSET_SPEC_EARLIEST = -2; + +/** + * enum rd_kafka_OffsetSpec_t + * @since 2.3.0 of librdkafka + */ +const RD_KAFKA_OFFSET_SPEC_LATEST = -1; + const RD_KAFKA_SUPPORTED_METHODS = [ 'rd_kafka_version' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_version_str' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_get_debug_contexts' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_get_err_descs' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_err2str' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_err2name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_last_error' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_errno2err' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_errno' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_fatal_error' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_test_fatal_error' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_add' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_add_range' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_del' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_del_by_idx' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_copy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_set_offset' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_find' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_list_sort' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_headers_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_headers_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_headers_copy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_header_add' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_header_remove' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_header_get_last' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_header_get' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_header_get_all' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_timestamp' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_latency' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_headers' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_detach_headers' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_set_headers' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_header_cnt' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_status' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_dup' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_dup_filter' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_events' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_background_event_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_dr_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_dr_msg_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_consume_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_rebalance_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_offset_commit_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_error_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_throttle_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_log_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_stats_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_socket_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_connect_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_closesocket_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_opaque' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_opaque' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_default_topic_conf' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_get' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_get' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_dump' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_dump' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_dump_free' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_properties_show' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_dup' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_default_topic_conf_dup' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_set' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_set_opaque' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_set_partitioner_cb' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_conf_set_msg_order_cmp' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_partition_available' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_random' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_consistent' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_consistent_random' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_murmur2' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_murmur2_random' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_destroy_flags' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_type' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_memberid' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_clusterid' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_controllerid' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_opaque' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_poll' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_yield' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_pause_partitions' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_resume_partitions' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_query_watermark_offsets' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_get_watermark_offsets' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_offsets_for_times' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mem_free' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_get_main' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_get_consumer' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_get_partition' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_get_background' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_forward' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_set_log_queue' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_length' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_io_event_enable' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_cb_event_enable' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_start' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_start_queue' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_stop' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_seek' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_batch' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_callback' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_queue' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_batch_queue' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consume_callback_queue' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_offset_store' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_offsets_store' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_subscribe' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_unsubscribe' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_subscription' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_poll' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_close' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_assign' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_assignment' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_commit' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_commit_message' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_commit_queue' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_committed' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_position' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_produce' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_producev' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_produce_batch' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_flush' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_purge' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_metadata' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_metadata_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_list_groups' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_group_list_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_brokers_add' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_set_logger' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_set_log_level' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_log_print' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_log_syslog' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_outq_len' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_dump' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_thread_cnt' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_wait_destroyed' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_unittest' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_poll_set_consumer' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_type' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_message_next' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_message_array' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_message_count' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_error' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_error_string' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_error_is_fatal' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_opaque' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_log' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_stats' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_topic_partition_list' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_topic_partition' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_CreateTopics_result' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DeleteTopics_result' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_CreatePartitions_result' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_AlterConfigs_result' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DescribeConfigs_result' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_poll' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_poll_callback' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_plugin_f_conf_init_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_conf_set_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_conf_dup_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_conf_destroy_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_new_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_destroy_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_send_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_acknowledgement_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_consume_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_commit_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_request_sent_t' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_interceptor_add_on_conf_set' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_interceptor_add_on_conf_dup' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_interceptor_add_on_conf_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_interceptor_add_on_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_send' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_acknowledgement' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_consume' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_commit' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_request_sent' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_result_error' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_result_error_string' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_topic_result_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_request_timeout' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_operation_timeout' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_validate_only' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_broker' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_opaque' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewTopic_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewTopic_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewTopic_destroy_array' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewTopic_set_replica_assignment' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewTopic_set_config' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_CreateTopics' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_CreateTopics_result_topics' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteTopic_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteTopic_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteTopic_destroy_array' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteTopics' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteTopics_result_topics' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewPartitions_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewPartitions_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewPartitions_destroy_array' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_NewPartitions_set_replica_assignment' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_CreatePartitions' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_CreatePartitions_result_topics' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigSource_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_value' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_source' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_is_read_only' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_is_default' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_is_sensitive' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_is_synonym' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigEntry_synonyms' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ResourceType_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_new' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_destroy' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_destroy_array' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_set_config' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_configs' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_type' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_name' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_error' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConfigResource_error_string' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConfigs' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConfigs_result_resources' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DescribeConfigs' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DescribeConfigs_result_resources' => [ 'min' => '1.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_oauthbearer_token_refresh_cb' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_ssl_cert_verify_cb' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_ssl_cert' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_config_string' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_oauthbearer_set_token' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_oauthbearer_set_token_failure' => [ 'min' => '1.1.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_thread_start_t' => [ 'min' => '1.2.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_thread_exit_t' => [ 'min' => '1.2.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_thread_start' => [ 'min' => '1.2.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_thread_exit' => [ 'min' => '1.2.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_cluster_new' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_cluster_destroy' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_cluster_handle' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_cluster_bootstraps' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_push_request_errors' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_topic_set_error' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_partition_set_leader' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_partition_set_follower' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_partition_set_follower_wmarks' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_set_rack' => [ 'min' => '1.3.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_code' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_name' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_string' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_is_fatal' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_is_retriable' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_txn_requires_abort' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_destroy' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_error_new' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_fnv1a' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_msg_partitioner_fnv1a_random' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_metadata' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_metadata_new' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_metadata_destroy' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_metadata_write' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_metadata_read' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_init_transactions' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_begin_transaction' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_send_offsets_to_transaction' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_commit_transaction' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_abort_transaction' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_handle_mock_cluster' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_topic_create' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_set_down' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_set_up' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_coordinator_set' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_set_apiversion' => [ 'min' => '1.4.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_set_rtt' => [ 'min' => '1.4.4', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_errstr' => [ 'min' => '1.5.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_message_broker_id' => [ 'min' => '1.5.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_produceva' => [ 'min' => '1.5.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_debug_contexts' => [ 'min' => '1.5.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_push_request_errors' => [ 'min' => '1.5.0', @@ -3289,470 +3466,750 @@ ], 'rd_kafka_conf_get_default_topic_conf' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_yield' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_seek_partitions' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_incremental_assign' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_incremental_unassign' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_rebalance_protocol' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_assignment_lost' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_metadata_new_with_genid' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DeleteRecords_result' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DeleteGroups_result' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DeleteConsumerGroupOffsets_result' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_group_result_error' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_group_result_name' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_group_result_partitions' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteRecords_new' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteRecords_destroy' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteRecords_destroy_array' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteRecords' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteRecords_result_offsets' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteGroup_new' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteGroup_destroy' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteGroup_destroy_array' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteGroups' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteGroups_result_groups' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteConsumerGroupOffsets_new' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteConsumerGroupOffsets_destroy' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteConsumerGroupOffsets_destroy_array' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteConsumerGroupOffsets' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteConsumerGroupOffsets_result_groups' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_clear_request_errors' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_push_request_errors_array' => [ 'min' => '1.6.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_response_received_t' => [ 'min' => '1.6.1', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_response_received' => [ 'min' => '1.6.1', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_engine_callback_data' => [ 'min' => '1.7.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mem_calloc' => [ 'min' => '1.7.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mem_malloc' => [ 'min' => '1.7.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_push_request_error_rtts' => [ 'min' => '1.7.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_enable_sasl_queue' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_queue_get_sasl' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_sasl_background_callbacks_enable' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_close_queue' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_closed' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_CreateAcls_result' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DescribeAcls_result' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DeleteAcls_result' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ResourcePatternType_name' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_acl_result_error' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclOperation_name' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclPermissionType_name' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_new' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBindingFilter_new' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_restype' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_name' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_principal' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_host' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_operation' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_permission_type' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_resource_pattern_type' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_error' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_destroy' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AclBinding_destroy_array' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_CreateAcls_result_acls' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_CreateAcls' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DescribeAcls_result_acls' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DescribeAcls' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteAcls_result_responses' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteAcls_result_response_error' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteAcls_result_response_matching_acls' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DeleteAcls' => [ 'min' => '1.9.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_conf_set_resolve_cb' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_sasl_set_credentials' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_Node_id' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_Node_host' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_Node_port' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_state_name' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_consumer_group_state_code' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_ListConsumerGroups_result' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_DescribeConsumerGroups_result' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_AlterConsumerGroupOffsets_result' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_event_ListConsumerGroupOffsets_result' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_f_on_broker_state_change_t' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_interceptor_add_on_broker_state_change' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_require_stable_offsets' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AdminOptions_set_match_consumer_group_states' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroups' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupListing_group_id' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupListing_is_simple_consumer_group' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupListing_state' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroups_result_valid' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroups_result_errors' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DescribeConsumerGroups' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_DescribeConsumerGroups_result_groups' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_group_id' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_error' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_is_simple_consumer_group' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_partition_assignor' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_state' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_coordinator' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_member_count' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ConsumerGroupDescription_member' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_MemberDescription_client_id' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_MemberDescription_group_instance_id' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_MemberDescription_consumer_id' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_MemberDescription_host' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_MemberDescription_assignment' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_MemberAssignment_partitions' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroupOffsets_new' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroupOffsets_destroy' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroupOffsets_destroy_array' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroupOffsets' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_ListConsumerGroupOffsets_result_groups' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConsumerGroupOffsets_new' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConsumerGroupOffsets_destroy' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConsumerGroupOffsets_destroy_array' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConsumerGroupOffsets' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_AlterConsumerGroupOffsets_result_groups' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + 'max' => '2.3.0' ], 'rd_kafka_mock_broker_error_stack_cnt' => [ 'min' => '2.0.0', - 'max' => '2.0.2' + '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' ] ]; diff --git a/tests/RdKafka/ConfTest.php b/tests/RdKafka/ConfTest.php index 257c465d..ce07c69b 100644 --- a/tests/RdKafka/ConfTest.php +++ b/tests/RdKafka/ConfTest.php @@ -218,24 +218,26 @@ public function testSetLogCbWithNullShouldDisableLogging(): void public function testSetErrorCb(): void { - $errorCallbackStack = []; + $errorCallbackStack = new class { + public $stack = []; + }; $conf = new Conf(); $conf->set('log_level', (string) LOG_EMERG); $conf->set('bootstrap.servers', 'unknown'); $conf->setErrorCb( - function (Consumer $consumer, $err, $reason, $opaque = null) use (&$errorCallbackStack): void { - $errorCallbackStack[] = $err; + function (Consumer $consumer, $err, $reason, $opaque = null) use ($errorCallbackStack): void { + $errorCallbackStack->stack[] = $err; } ); $consumer = new Consumer($conf); do { $consumer->poll(0); - } while (\count($errorCallbackStack) < 2); + } while (\count($errorCallbackStack->stack) < 2); - $this->assertSame(RD_KAFKA_RESP_ERR__RESOLVE, $errorCallbackStack[0]); - $this->assertSame(RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN, $errorCallbackStack[1]); + $this->assertSame(RD_KAFKA_RESP_ERR__RESOLVE, $errorCallbackStack->stack[0]); + $this->assertSame(RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN, $errorCallbackStack->stack[1]); } /** @@ -245,37 +247,42 @@ public function testSetErrorCbWithOpaque(): void { $expectedOpaque = new \stdClass(); - $opaqueCallbackStack = []; + $opaqueCallbackStack = new class { + public $stack = []; + }; $conf = new Conf(); $conf->set('log_level', (string) LOG_EMERG); $conf->set('bootstrap.servers', 'unknown'); $conf->setOpaque($expectedOpaque); $conf->setErrorCb( - function (Consumer $consumer, int $err, string $reason, $opaque = null) use (&$opaqueCallbackStack): void { - $opaqueCallbackStack[] = $opaque; + function (Consumer $consumer, int $err, string $reason, $opaque = null) use ($opaqueCallbackStack): void { + $opaqueCallbackStack->stack[] = $opaque; } ); $consumer = new Consumer($conf); + $consumer->getOpaque(); do { $consumer->poll(0); - } while (\count($opaqueCallbackStack) < 2); + } while (\count($opaqueCallbackStack->stack) < 2); - $this->assertSame($expectedOpaque, $opaqueCallbackStack[0]); - $this->assertSame($expectedOpaque, $opaqueCallbackStack[1]); + $this->assertSame($expectedOpaque, $opaqueCallbackStack->stack[0]); + $this->assertSame($expectedOpaque, $opaqueCallbackStack->stack[1]); } public function testSetDrMsgCb(): void { - $drMsgCallbackStack = []; + $drMsgCallbackStack = new class { + public $stack = []; + }; $conf = new Conf(); $conf->set('bootstrap.servers', KAFKA_BROKERS); $conf->set('batch.num.messages', (string) 1); $conf->setDrMsgCb( - function ($producer, $message) use (&$drMsgCallbackStack): void { - $drMsgCallbackStack[] = [ + function ($producer, $message) use ($drMsgCallbackStack): void { + $drMsgCallbackStack->stack[] = [ 'producer' => $producer, 'message' => $message, ]; @@ -288,11 +295,11 @@ function ($producer, $message) use (&$drMsgCallbackStack): void { $producerTopic->produce(0, 0, __METHOD__ . '2'); $producer->poll(KAFKA_TEST_TIMEOUT_MS); - $this->assertCount(2, $drMsgCallbackStack); - $this->assertSame($producer, $drMsgCallbackStack[0]['producer']); - $this->assertSame(__METHOD__ . '1', $drMsgCallbackStack[0]['message']->payload); - $this->assertSame($producer, $drMsgCallbackStack[1]['producer']); - $this->assertSame(__METHOD__ . '2', $drMsgCallbackStack[1]['message']->payload); + $this->assertCount(2, $drMsgCallbackStack->stack); + $this->assertSame($producer, $drMsgCallbackStack->stack[0]['producer']); + $this->assertSame(__METHOD__ . '1', $drMsgCallbackStack->stack[0]['message']->payload); + $this->assertSame($producer, $drMsgCallbackStack->stack[1]['producer']); + $this->assertSame(__METHOD__ . '2', $drMsgCallbackStack->stack[1]['message']->payload); $producer->flush(KAFKA_TEST_TIMEOUT_MS); } @@ -304,15 +311,17 @@ public function testSetDrMsgCbWithOpaque(): void { $expectedOpaque = new \stdClass(); - $drMsgCallbackStack = []; + $drMsgCallbackStack = new class { + public $stack = []; + }; $conf = new Conf(); $conf->set('bootstrap.servers', KAFKA_BROKERS); $conf->set('batch.num.messages', (string) 1); $conf->setOpaque($expectedOpaque); $conf->setDrMsgCb( - function (Producer $producer, Message $message, $opaque = null) use (&$drMsgCallbackStack): void { - $drMsgCallbackStack[] = [ + function (Producer $producer, Message $message, $opaque = null) use ($drMsgCallbackStack): void { + $drMsgCallbackStack->stack[] = [ 'producer' => $producer, 'opaque' => $opaque, ]; @@ -325,11 +334,11 @@ function (Producer $producer, Message $message, $opaque = null) use (&$drMsgCall $producerTopic->produce(0, 0, __METHOD__ . '2'); $producer->poll(KAFKA_TEST_TIMEOUT_MS); - $this->assertCount(2, $drMsgCallbackStack); - $this->assertSame($producer, $drMsgCallbackStack[0]['producer']); - $this->assertSame($expectedOpaque, $drMsgCallbackStack[0]['opaque']); - $this->assertSame($producer, $drMsgCallbackStack[1]['producer']); - $this->assertSame($expectedOpaque, $drMsgCallbackStack[1]['opaque']); + $this->assertCount(2, $drMsgCallbackStack->stack); + $this->assertSame($producer, $drMsgCallbackStack->stack[0]['producer']); + $this->assertSame($expectedOpaque, $drMsgCallbackStack->stack[0]['opaque']); + $this->assertSame($producer, $drMsgCallbackStack->stack[1]['producer']); + $this->assertSame($expectedOpaque, $drMsgCallbackStack->stack[1]['opaque']); $producer->flush(KAFKA_TEST_TIMEOUT_MS); } @@ -393,7 +402,10 @@ function (Consumer $consumer, string $json, int $json_len, $opaque = null) use ( */ public function testSetRebalanceCb(): void { - $rebalanceCallbackStack = []; + $rebalanceCallbackStack = new class { + public $stack = []; + }; + $failedTimeoutSec = 30; $conf = new Conf(); @@ -401,8 +413,8 @@ public function testSetRebalanceCb(): void $conf->set('group.id', __METHOD__ . random_int(0, 99999999)); $conf->set('bootstrap.servers', KAFKA_BROKERS); $conf->setRebalanceCb( - function (KafkaConsumer $consumer, int $err, array $topicPartitions, $opaque = null) use (&$rebalanceCallbackStack): void { - $rebalanceCallbackStack[] = [ + function (KafkaConsumer $consumer, int $err, array $topicPartitions, $opaque = null) use ($rebalanceCallbackStack): void { + $rebalanceCallbackStack->stack[] = [ 'consumer' => $consumer, 'err' => $err, 'partitions' => $topicPartitions, @@ -436,26 +448,26 @@ function (KafkaConsumer $consumer, int $err, array $topicPartitions, $opaque = n $consumer2->consume((int) 50); $consumer3->consume((int) 50); $durationSec = time() - $startTime; - } while (\count($rebalanceCallbackStack) < 3 && $durationSec < $failedTimeoutSec); + } while (\count($rebalanceCallbackStack->stack) < 3 && $durationSec < $failedTimeoutSec); $this->assertLessThan($failedTimeoutSec, $durationSec, 'adding consumer took too long'); - $assignedConsumers = array_column($rebalanceCallbackStack, 'consumer'); + $assignedConsumers = array_column($rebalanceCallbackStack->stack, 'consumer'); $this->assertContains($consumer1, $assignedConsumers); $this->assertContains($consumer2, $assignedConsumers); $this->assertContains($consumer3, $assignedConsumers); - $this->assertSame(RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS, $rebalanceCallbackStack[0]['err']); - $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack[0]['partitions']); + $this->assertSame(RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS, $rebalanceCallbackStack->stack[0]['err']); + $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack->stack[0]['partitions']); - $this->assertSame(RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS, $rebalanceCallbackStack[1]['err']); - $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack[1]['partitions']); + $this->assertSame(RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS, $rebalanceCallbackStack->stack[1]['err']); + $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack->stack[1]['partitions']); - $this->assertSame(RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS, $rebalanceCallbackStack[2]['err']); - $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack[2]['partitions']); + $this->assertSame(RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS, $rebalanceCallbackStack->stack[2]['err']); + $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack->stack[2]['partitions']); // reset stack - $rebalanceCallbackStack = []; + $rebalanceCallbackStack->stack = []; // revoke $consumer1->close(); @@ -466,23 +478,23 @@ function (KafkaConsumer $consumer, int $err, array $topicPartitions, $opaque = n do { usleep(50 * 1000); $durationSec = time() - $startTime; - } while (\count($rebalanceCallbackStack) < 3 && $durationSec < $failedTimeoutSec); + } while (\count($rebalanceCallbackStack->stack) < 3 && $durationSec < $failedTimeoutSec); $this->assertLessThan($failedTimeoutSec, $durationSec, 'removing consumer took too long'); - $revokedConsumers = array_column($rebalanceCallbackStack, 'consumer'); + $revokedConsumers = array_column($rebalanceCallbackStack->stack, 'consumer'); $this->assertContains($consumer1, $revokedConsumers); $this->assertContains($consumer2, $revokedConsumers); $this->assertContains($consumer3, $revokedConsumers); - $this->assertSame(RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS, $rebalanceCallbackStack[0]['err']); - $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack[0]['partitions']); + $this->assertSame(RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS, $rebalanceCallbackStack->stack[0]['err']); + $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack->stack[0]['partitions']); - $this->assertSame(RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS, $rebalanceCallbackStack[1]['err']); - $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack[1]['partitions']); + $this->assertSame(RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS, $rebalanceCallbackStack->stack[1]['err']); + $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack->stack[1]['partitions']); - $this->assertSame(RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS, $rebalanceCallbackStack[2]['err']); - $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack[2]['partitions']); + $this->assertSame(RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS, $rebalanceCallbackStack->stack[2]['err']); + $this->assertGreaterThanOrEqual(1, $rebalanceCallbackStack->stack[2]['partitions']); } /** @@ -545,7 +557,9 @@ function (KafkaConsumer $consumer, int $err, array $topicPartitions, $opaque = n public function testSetOffsetCommitCb(): void { - $offsetCommitCallbackStack = []; + $offsetCommitCallbackStack = new class { + public $stack = []; + }; $conf = new Conf(); $conf->set('group.id', __METHOD__ . random_int(0, 99999999)); @@ -556,8 +570,8 @@ function ( int $err, array $topicPartitions, $opaque = null - ) use (&$offsetCommitCallbackStack): void { - $offsetCommitCallbackStack[] = [ + ) use ($offsetCommitCallbackStack): void { + $offsetCommitCallbackStack->stack[] = [ 'consumer' => $consumer, 'err' => $err, 'topicPartitions' => $topicPartitions, @@ -572,9 +586,9 @@ function ( // trigger callback $consumer->consume(0); - $this->assertSame($consumer, $offsetCommitCallbackStack[0]['consumer']); - $this->assertSame(0, $offsetCommitCallbackStack[0]['err']); - $this->assertSame(20, $offsetCommitCallbackStack[0]['topicPartitions'][0]->getOffset()); + $this->assertSame($consumer, $offsetCommitCallbackStack->stack[0]['consumer']); + $this->assertSame(0, $offsetCommitCallbackStack->stack[0]['err']); + $this->assertSame(20, $offsetCommitCallbackStack->stack[0]['topicPartitions'][0]->getOffset()); } /**