MyGit

v0.11.5

confluentinc/confluent-kafka-python

版本发布时间: 2018-07-20 19:19:28

confluentinc/confluent-kafka-python最新发布版本:v2.5.3(2024-09-02 22:24:36)

Admin Client support

v0.11.5 is a feature release that adds support for the Kafka Admin API (KIP-4).

Admin API

This release adds support for the Admin API, enabling applications and users to perform administrative Kafka tasks programmatically:

The API closely follows the Java Admin API:

def example_create_topics(a, topics):
    new_topics = [NewTopic(topic, num_partitions=3, replication_factor=1) for topic in topics]
    # Call create_topics to asynchronously create topics
    fs = a.create_topics(new_topics)

    # Wait for operation to finish.
    for topic, f in fs.items():
        try:
            f.result()  # The result itself is None
            print("Topic {} created".format(topic))
        except Exception as e:
            print("Failed to create topic {}: {}".format(topic, e))

Additional examples can be found in examples/adminapi

Enhancements

Fixes

相关地址:原始地址 下载(tar) 下载(zip)

查看:2018-07-20发行的版本