...
Network protocol and api behavior
Code Block |
---|
|
CreateTopics Request (Version: 4) => [create_topic_requests] timeout validate_only
create_topic_requests => topic num_partitions replication_factor [replica_assignment] [config_entries] min_required_replication_factor
topic => STRING
num_partitions => INT32
replication_factor => INT16
replica_assignment => partition [replicas]
partition => INT32
replicas => INT32
config_entries => config_name config_value
config_name => STRING
config_value => NULLABLE_STRING
min_required_replication_factor => INT16 //new field
timeout => INT32
validate_only => BOOLEAN |
Code Block |
---|
CreateTopicsResponse (Version: 4) //same schema as version 3 |
...
Code Block |
---|
title | CreatePartitionsRequest |
---|
|
CreatePartitions Request (Version: 2) => [topic_partitions] timeout validate_only
topic_partitions => topic new_partitions
topic => STRING
new_partitions => count [assignment] min_required_replication_factor
count => INT32
assignment => ARRAY(INT32)
min_required_replication_factor => INT16 //new field
timeout => INT32
validate_only => BOOLEAN |
...
CreatePartitionsResponse (Version: 2) //same schema as version 1 |
Error Codes
ERROR | CODE | RETRIABLE | DESCRIPTION |
CREATED_UNDER_REPLICATED | 79 | False | The server createda topic or partitions without the full set of replicas being active. |
...
The AdminClient will be updated to expose the new fields.
Code Block |
---|
language | java |
---|
title | NewTopic |
---|
|
...
|
// Keep existing constructors but add a getter/setter pair
// to specify the minimum required replication factor if different |
...
Code Block |
---|
language | java |
---|
title | NewTopic |
---|
|
from full
package org.apache.kafka.clients.admin;
public class NewTopic {
....
// return `this` for chaining
public NewTopic minRequiredReplicationFactor(short requiredReplicationFactor) {}
public short minRequiredReplicationFactor() {}
} |
Code Block |
---|
language | java |
---|
title | NewPartition |
---|
|
...
|
// Keep existing factory methods and add a getter/setter pair (like NewTopic) |
...
Code Block |
---|
language | java |
---|
title | NewPartition |
---|
|
// to specify the minimum required replication factor if different from full
package org.apache.kafka.clients.admin;
public class NewPartition {
....
// return `this` for chaining
public NewPartition minRequiredReplicationFactor(short requiredReplicationFactor) {}
public short minRequiredReplicationFactor() {}
} |
...