Skip to main content

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​

InputTypeRequiredDefaultWhat it is
Endpoint addressStringNoKafka REST Proxy address, e.g. https://pkc-12345.us-east-1.aws.confluent.cloud:443 or http://kafka-rest.internal:8082.
TopicStringYesName of the new topic.
PartitionsNumberNo6Number of partitions; more partitions let more readers work in parallel.
Replication factorNumberNoCopies of each message kept on different servers. Leave empty for the cluster default.
SettingsDictionaryNoTopic settings, e.g. {"retention.ms": "604800000", "cleanup.policy": "delete"}.
Fail if existsBooleanNofalseStop with an error if the topic is already there, instead of carrying on.
Cluster IDStringNoKafka cluster id. Leave empty to use the only (first) cluster the proxy serves.
API keyStringNoAPI key or user name, used with api_secret.
API secretCredentialNoAPI secret or password from the vault.
Access tokenCredentialNoBearer token from the vault, used instead of an API key and secret.

Outputs​

OutputTypeWhat it is
createdBooleanTrue if the topic was created, false if it was already there.