doctl databases topics create
Generated on 9 Apr 2025
from doctl
version
v1.124.0
Usage
doctl databases topics create <database-uuid> <topic-name> [flags]
Aliases
c
Description
This command creates a kafka topic for the specified kafka database cluster, giving it the specified name. Example: doctl databases topics create
Flags
Option | Description |
---|---|
--cleanup-policy |
Specifies the retention policy to use on log segments: Possible values are ‘delete’, ‘compact_delete’, ‘compact’ Default: delete |
--compression-type |
Specifies the compression type for a kafka topic: Possible values are ‘producer’, ‘gzip’, ‘snappy’, ‘Iz4’, ‘zstd’, ‘uncompressed’ Default: producer |
--delete-retention-ms |
Specifies how long (in ms) to retain delete tombstone markers for topics |
--file-delete-delay-ms |
Specifies the minimum time (in ms) to wait before deleting a file from the filesystem |
--flush-messages |
Specifies the maximum number of messages to accumulate on a log partition before messages are flushed to disk |
--flush-ms |
Specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk |
--help , -h |
Help for this command |
--interval-index-bytes |
Specifies the number of bytes between entries being added into the offset index |
--max-compaction-lag-ms |
Specifies the maximum time (in ms) that a message will remain uncompacted. This is only applicable if the logs have compaction enabled |
--max-message-bytes |
Specifies the largest record batch (in bytes) that can be sent to the server. This is calculated after compression, if compression is enabled |
--message-down-conversion-enable |
Specifies whether down-conversion of message formats is enabled to satisfy consumer requests Default: true |
--message-format-version |
Specifies the message format version used by the broker to append messages to the logs. By setting a format version, all existing messages on disk must be smaller or equal to the specified version |
--message-timestamp-type |
Specifies whether to use the create time or log append time as the timestamp on a message |
--min-cleanable-dirty-ratio |
Specifies the frequenty of log compaction (if enabled) in relation to duplicates present in the logs. For example, 0.5 would mean at most half of the log could be duplicates before compaction would begin |
--min-compaction-lag-ms |
Specifies the minimum time (in ms) that a message will remain uncompacted. This is only applicable if the logs have compaction enabled |
--min-insync-replicas |
Specifies the minimum number of replicas that must ACK a write for it to be considered successful |
--partition-count |
Specifies the number of partitions available for the topic Default: 1 |
--preallocate |
Specifies whether a file should be preallocated on disk when creating a new log segment Default: false |
--replication-factor |
Specifies the number of nodes to replicate data across the kafka cluster Default: 2 |
--retention-bytes |
Specifies the maximum size (in bytes) before deleting messages. ‘-1’ indicates that there is no limit |
--retention-ms |
Specifies the maximum time (in ms) to store a message before deleting it. ‘-1’ indicates that there is no limit |
--segment-bytes |
Specifies the maximum size (in bytes) of a single log file |
--segment-jitter-ms |
Specifies the maximum time (in ms) for random jitter that is subtracted from the scheduled segment roll time to avoid thundering herd problems |
--segment-ms |
Specifies the maximum time (in ms) to wait to force a log roll if the segment file isn’t full. After this period, the log will be forced to roll |
Related Commands
Command | Description |
---|---|
doctl databases topics | Display commands to manage topics for kafka database clusters |
Global Flags
Option | Description |
---|---|
--access-token , -t |
API V2 access token |
--api-url , -u |
Override default API endpoint |
--config , -c |
Specify a custom config file Default: |
--context |
Specify a custom authentication context name |
--http-retry-max |
Set maximum number of retries for requests that fail with a 429 or 500-level error
Default: 5 |
--http-retry-wait-max |
Set the minimum number of seconds to wait before retrying a failed request
Default: 30 |
--http-retry-wait-min |
Set the maximum number of seconds to wait before retrying a failed request
Default: 1 |
--interactive |
Enable interactive behavior. Defaults to true if the terminal supports it (default false)
Default: false |
--output , -o |
Desired output format [text|json] Default: text |
--trace |
Show a log of network activity while performing a command Default: false |
--verbose , -v |
Enable verbose output Default: false |