Modifying Kafka Topic Configurations¶
This section describes how to modify following configurations of a Kafka topic on the console.
Note
Modifying Synchronous Replication, Synchronous Flushing, Message Timestamp, or Max. Message Size does not require instance restart.
Parameter | Description |
---|---|
Partitions | Number of partitions in a topic. For details about how to change, see Changing Kafka Partition Quantity. |
Aging Time (h) | Maximum message retention. For details about how to change, see Changing Kafka Message Retention Period. |
Synchronous Replication | A message is returned to the client only after the message creation request has been received and the message has been acknowledged by all replicas. |
Synchronous Flushing |
|
Message Timestamp | Timestamp type of a message. Options:
|
Max. Message Size | Maximum size of messages to be processed in batches. If message compression is enabled, this parameter indicates the size after compression. If this value is increased and the consumer version is earlier than 0.10.2, the consumers' fetch size must also be increased so that they can obtain the latest value. |
Procedure¶
Log in to the console.
Click in the upper left corner to select a region.
Note
Select the region where your Kafka instance is located.
Click Service List and choose Application > Distributed Message Service. The Kafka instance list is displayed.
Click the desired Kafka instance to view the instance details.
In the navigation pane, choose Topics.
Modify topic configurations in either of the following ways:
Select one or more topics and click Edit Topic above the topic list.
In the row containing the desired topic, click Edit.
In the Edit Topic dialog box, change configurations and click OK.
Note
If there is only one replica, Synchronous Replication cannot be enabled.
After enabling synchronous replication, set acks to all or -1 on the client. Otherwise, this function will not take effect.