Modifying Kafka Instance Configuration Parameters
Your Kafka instances, topics, and consumers come with default configuration parameter settings. You can modify common parameters on the Kafka console. For details about parameters that are not listed on the console, see the Kafka official website.
Kafka instances have dynamic and static parameters:
- Dynamic parameters: Modifying dynamic parameters will not restart the instance.
- Static parameters: After static parameters are modified, you must manually restart the instance.
Notes and Constraints
- Configuration parameters of some old instances cannot be modified. Check whether your instance parameters can be modified on the console. If they cannot be modified, contact customer service.
- This function is not available for single-node instances.
Prerequisites
You can modify configuration parameters of a Kafka instance when the instance is in the Running state.
Procedure
- Log in to the Kafka console.
- Click
in the upper left corner to select the region where your instance is located. - Click a Kafka instance name to go to the instance details page.
- Choose Instance > Parameters.
Table 1 Modifying or restoring parameters Operation
Procedure
Modifying a specific parameter
- In the row that contains the parameter to be modified, click Edit.
- In the Current Value column, set a value and click Save. The Edit Dynamic Parameters or Edit Static Parameters dialog box is displayed.
- Click OK.
- Dynamic parameters: After the modification is successful, the specified value is displayed in the Current Value column.
- Static parameters: After the modification is successful, manually restart the instance. After the restart, the specified value is displayed in the Current Value column.
Modifying parameters in batches
- Select the parameters to be modified and click Modify in the upper left.
- In the Current Value column, set a value for each parameter and click Save in the upper left. The Edit Dynamic Parameters or Edit Static Parameters dialog box is displayed.
- Click OK.
- Dynamic parameters: After the modification is successful, the specified value is displayed in the Current Value column.
- Static parameters: After the modification is successful, manually restart the instance. After the restart, the specified value is displayed in the Current Value column.
Restoring a specific parameter
- In the row that contains the parameter to be restored, click Edit.
- Click Restore Default. The Current Value is restored to the default value. Click Save. The Edit Dynamic Parameters or Edit Static Parameters dialog box is displayed.
- Click OK.
- Dynamic parameters: After the modification is successful, the default value is displayed in the Current Value column.
- Static parameters: After the modification is successful, manually restart the instance. After the restart, the default value is displayed in the Current Value column.
Restoring parameters in batches
- Select the parameters to be restored and click Modify in the upper left.
- Click Restore Default for each selected parameter. The Current Value is restored to the default value. Click Save in the upper left. The Edit Dynamic Parameters or Edit Static Parameters dialog box is displayed.
- Click OK.
- Dynamic parameters: After the modification is successful, the default values are displayed in the Current Value column.
- Static parameters: After the modification is successful, manually restart the instance. After the restart, the default values are displayed in the Current Value column.
Parameters of v1.1.0 instances are described in Table 2 and Table 3. Parameters of v2.3.0/v2.7/v3.x instances are described in Table 4 and Table 5.
Table 2 Dynamic parameters (v1.1.0 instances) Parameter
Description
Value Range
Default Value
auto.create.groups.enable
Whether to automatically create consumer groups.
You can modify this parameter on the console only for instances created on or after April 25, 2023. For instances created before April 25, 2023, the function of automatically creating consumer groups is enabled by default and cannot be disabled on the console.
true or false
true
offsets.retention.minutes
The longest period a consumption position can be retained starts from the time of submission. Positions retained beyond this duration will be deleted. Each time a consumption position is submitted to a topic partition, its retention period resets to 0.
This is a static parameter for instances created before May 1, 2023.
1,440–30,240
Unit: minute
20,160
Table 3 Static parameters (v1.1.0 instances) Parameter
Description
Value Range
Default Value
min.insync.replicas
If a producer sets the acks parameter to all (or -1), the min.insync.replicas parameter specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful.
CAUTION:If the value of this parameter is greater than 1, the synchronous replication function takes effect automatically according to the following rules:
- Existing topics: If the synchronous replication function was not enabled during topic creation and has not been manually modified, it will be automatically enabled.
- New topics: If the synchronous replication function was not enabled during creation, it is enabled by default after the topics are created.
1–3
1
message.max.bytes
Maximum length of a single message.
0–10,485,760
Unit: byte
10,485,760
unclean.leader.election.enable
Indicates whether to allow replicas not in the ISR set to be elected as the leader as a last resort, even though doing so may result in data loss.
true or false
false
connections.max.idle.ms
Idle connection timeout (in ms). Connections that are idle for the duration specified by this parameter will be closed.
5,000–600,000
Unit: millisecond
600,000
log.retention.hours
Message retention duration of an instance, in hours.
This parameter takes effect only for topics that have no aging time configured. If there is aging time configured for topics, it overrides this parameter.
1–168
Unit: hour
72
max.connections.per.ip
The maximum number of connections allowed from each IP address. Request for new connections will be rejected once the limit is reached.
100–20,000
1000
group.max.session.timeout.ms
Maximum session timeout for consumers. A longer timeout gives consumers more time to process messages between heartbeats but results in a longer time to detect failures.
6,000–1,800,000
Unit: millisecond
1,800,000
default.replication.factor
The default number of replicas configured for an automatically created topic.
1–3
3
allow.everyone.if.no.acl.found
- When this parameter is set to true, all users can access resources without ACL rules.
- When this parameter is set to false, the initial user has all the permissions and other users require authorization.
All the permissions cover modifying a topic, creating and deleting a topic, and changing the number of topic partitions.
This parameter is displayed only when ciphertext access is enabled for the instance.
This parameter cannot be modified for instances created before September 15, 2023.
true or false
true
num.partitions
The default number of partitions configured for each automatically created topic.
1–200
3
group.min.session.timeout.ms
Minimum session timeout for consumers. A shorter timeout enables quicker failure detection but results in more frequent consumer heartbeating, which can overwhelm broker resources.
6,000–300,000
Unit: millisecond
6,000
Table 4 Dynamic parameters (v2.3.0/v2.7/v3.x) Parameter
Description
Value Range
Default Value
min.insync.replicas
If a producer sets the acks parameter to all (or -1), the min.insync.replicas parameter specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful.
CAUTION:If the value of this parameter is greater than 1, the synchronous replication function takes effect automatically according to the following rules:
- Existing topics: If the synchronous replication function was not enabled during topic creation and has not been manually modified, it will be automatically enabled.
- New topics: If the synchronous replication function was not enabled during creation, it is enabled by default after the topics are created.
1–3
1
message.max.bytes
Maximum length of a single message.
0–10,485,760
Unit: byte
10,485,760
auto.create.groups.enable
Whether to automatically create consumer groups.
You can modify this parameter on the console only for instances created on or after April 25, 2023. For instances created before April 25, 2023, the function of automatically creating consumer groups is enabled by default and cannot be disabled on the console.
true or false
true
max.connections.per.ip
The maximum number of connections allowed from each IP address. Request for new connections will be rejected once the limit is reached.
100–20,000
1000
unclean.leader.election.enable
Indicates whether to allow replicas not in the ISR set to be elected as the leader as a last resort, even though doing so may result in data loss.
true or false
false
offsets.retention.minutes
The longest period a consumption position can be retained starts from the time of submission. Positions retained beyond this duration will be deleted. Each time a consumption position is submitted to a topic partition, its retention period resets to 0.
This is a static parameter for instances created before May 1, 2023.
1,440–30,240
Unit: minute
20,160
Table 5 Static parameters (v2.3.0/v2.7/v3.x) Parameter
Description
Value Range
Default Value
connections.max.idle.ms
Idle connection timeout (in ms). Connections that are idle for the duration specified by this parameter will be closed.
5,000–600,000
Unit: millisecond
600,000
log.retention.hours
Message retention duration of an instance, in hours.
This parameter takes effect only for topics that have no aging time configured. If there is aging time configured for topics, it overrides this parameter.
1–168
Unit: hour
72
group.max.session.timeout.ms
Maximum session timeout for consumers. A longer timeout gives consumers more time to process messages between heartbeats but results in a longer time to detect failures.
6,000–1,800,000
Unit: millisecond
1,800,000
default.replication.factor
The default number of replicas configured for an automatically created topic.
1–3
3
allow.everyone.if.no.acl.found
- When this parameter is set to true, all users can access resources without ACL rules.
- When this parameter is set to false, the initial user has all the permissions and other users require authorization.
All the permissions cover modifying a topic, creating and deleting a topic, and changing the number of topic partitions.
This parameter is displayed only when ciphertext access is enabled for the instance.
This parameter cannot be modified for instances created before September 15, 2023.
true or false
true
num.partitions
The default number of partitions configured for each automatically created topic.
1–200
3
group.min.session.timeout.ms
Minimum session timeout for consumers. A shorter timeout enables quicker failure detection but results in more frequent consumer heartbeating, which can overwhelm broker resources.
6,000–300,000
Unit: millisecond
6,000
- Click Save.
Modifying dynamic parameters will not restart the instance. Static parameter modification requires manual restart of the instance.
On the Parameters page, view the new parameter values in the Current Value column.
Related Document
To modify parameters of a Kafka instance by calling an API, see Modifying Instance Configurations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot