...
- We need to be able to send error messages back to the client, so we introduce an
error_message
string field in thetopic_errors
array of theCreateTopics
response. - We need a new error code for
PolicyViolationException
, so we assign error code44
toPOLICY_VIOLATION
. - For tools that allow users to create topics, a validation/dry-run mode where validation errors are reported but no creation is attempted is useful. A precedent for this exists in the Connect REST API. We introduce a
validateOnly
validate_only
boolean field in theCreateTopics
request to enable this mode.
...
Code Block | ||
---|---|---|
| ||
CreateTopics Request (Version: 1) => [create_topic_requests] timeout validateOnlyvalidate_only (new) create_topic_requests => topic num_partitions replication_factor [replica_assignment] [configs] topic => STRING num_partitions => INT32 replication_factor => INT16 replica_assignment => partition_id [replicas] partition_id => INT32 replicas => INT32 configs => config_key config_value config_key => STRING config_value => STRING timeout => INT32 validateOnlyvalidate_only => BOOLEAN (new) CreateTopics Response (Version: 1) => [topic_errors] topic_errors => topic error_code error_message (new) topic => STRING error_code => INT16 error_message => NULLABLE_STRING (new) |
...