Create topic
Create a topic with a number of partitions and optional settings such as how long messages are kept.
Command in the Kafka toolkit · id ooa.kafka/create_topic · 10 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Endpoint address | String | No | Kafka REST Proxy address, e.g. https://pkc-12345.us-east-1.aws.confluent.cloud:443 or http://kafka-rest.internal:8082. | |
| Topic | String | Yes | Name of the new topic. | |
| Partitions | Number | No | 6 | Number of partitions; more partitions let more readers work in parallel. |
| Replication factor | Number | No | Copies of each message kept on different servers. Leave empty for the cluster default. | |
| Settings | Dictionary | No | Topic settings, e.g. {"retention.ms": "604800000", "cleanup.policy": "delete"}. | |
| Fail if exists | Boolean | No | false | Stop with an error if the topic is already there, instead of carrying on. |
| Cluster ID | String | No | Kafka cluster id. Leave empty to use the only (first) cluster the proxy serves. | |
| API key | String | No | API key or user name, used with api_secret. | |
| API secret | Credential | No | API secret or password from the vault. | |
| Access token | Credential | No | Bearer token from the vault, used instead of an API key and secret. |
Outputs
| Output | Type | What it is |
|---|---|---|
| created | Boolean | True if the topic was created, false if it was already there. |