This command creates a topic for event publishing.
Usage
topic create --database-name NAME --name NAME --topic-partitions COUNT [--retention-ms MILLISECONDS] [--message-timestamp-type CreateTime|LogAppendTime] [--message-timestamp-before-max-ms MILLISECONDS] [--message-timestamp-after-max-ms MILLISECONDS]
Required Parameters
| The name of the database where the topic is to be created. |
| The name of the topic to be created. |
| The number of partitions in the topic to be created. Each partition can hold up to 1000 topics. The number of partitions in a topic cannot be changed after the topic has been created. |
Options
| The amount of time, in milliseconds, to keep an event record in the topic. When the retention period for a record expires, the records is deleted from the topic. The default retention period is seven days. The minimum allowed retention period is 6 hours. A value of -1 means no retention period. |
| Determines how the event timestamp is set:
|
| If the message timestamp type is set to |
| If the message timestamp type is set to |
Example
To create a topic named mytopic with 30 partitions in the kafkatopics database:
vcli: admin> topic create --database-name kafkatopics --name mytopic --partitions 30