Apache Kafka TopicCreatePartitions

Apache Kafka TopicCreatePartitions

Certified

Increase the partition count of a Kafka topic

Grows a topic to a new total partition count using the Kafka AdminClient. Partition counts can only be increased, never decreased. Fails with UnknownTopicOrPartitionException if the topic does not exist, or InvalidPartitionsException if totalPartitionCount is not greater than the current count.

yaml
type: io.kestra.plugin.kafka.TopicCreatePartitions

Scale out a tenant topic to 12 partitions

yaml
id: kafka_topic_create_partitions
namespace: company.team

tasks:
  - id: create_partitions
    type: io.kestra.plugin.kafka.TopicCreatePartitions
    properties:
      bootstrap.servers: localhost:9092
    topic: tenant_acme_orders
    totalPartitionCount: 12
Properties

Kafka AdminClient properties

Must include bootstrap.servers; accepts any Kafka AdminClient config. Provide base64-encoded content for ssl.keystore.location and ssl.truststore.location when using SSL.

Topic name

New total partition count

Must be greater than the topic's current partition count.

Reference (ref) of the pluginDefaults to apply to this task.

DefaultPT30S

AdminClient call timeout

Maximum duration to wait for each AdminClient operation to complete before failing the task. Defaults to PT30S (30 seconds).

Topic name

New total partition count