--- title: "topic modify" slug: "topic-modify" tags: ["5.5"] updated: 2026-10-27T23:00:54Z published: 2026-10-27T23:00:54Z canonical: "docs.vastdata.com/topic-modify" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # topic modify This command modifies a topic. ## Usage ```plaintext topic modify --database-name NAME             --name NAME             [--new-name NEW_NAME]             [--retention-ms MILLISECONDS]             [--cleanup-policy POLICY]             [--min-compaction-lag-ms MILLISECONDS]             [--delete-retention-ms MILLISECONDS]             [--message-timestamp-type CreateTime|LogAppendTime]             [--message-timestamp-before-max-ms MILLISECONDS]             [--message-timestamp-after-max-ms MILLISECONDS] ``` ## Required Parameters | `--database-name NAME` | The name of the database where the topic resides. | | --- | --- | | `--name NAME` | The name of the topic to be modified. | ## Options | `--new-name NEW_NAME` | This option lets you rename an existing topic. | | --- | --- | | `--retention-ms MILLISECONDS` | 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. | | `--cleanup-policy POLICY` | The default cleanup policy for segments beyond the retention period. Valid values are `delete` and `compact`. | | `--min-compaction-lag-ms MILLISECONDS` | The minimum time during which a message can stay non-compacted in the partition log. | | `--delete-retention-ms MILLISECONDS` | The period during which tombstone records can be kept in a topic for which compaction is enabled. | | `--message-timestamp-type CreateTime\|LogAppendTime` | Determines how the event timestamp is set: - `CreateTime` (default): The timestamp is based on the time when the event was encountered at the event producer. - `LogAppendTime`: The timestamp is based on the time when the event record was added to the log at the event broker. | | `--message-timestamp-before-max-ms MILLISECONDS` | If the message timestamp type is set to `CreateTime`, specify this option to determine how much earlier the message timestamp can be than the broker timestamp. If this value is exceeded, the message is rejected. | | `--message-timestamp-after-max-ms MILLISECONDS` | If the message timestamp type is set to `CreateTime`, specify this option to determine how much later the message timestamp can be than the broker timestamp. If this value is exceeded, the message is rejected. | ## Example To set the message timestamp type to `LogAppendTime`: ```plaintext vcli: admin> topic modify --database-name kafkatopics --name mytopic --message-timestamp-type LogAppendTime ```