Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

New Protocol Errors

It is proposed to use existing / add these error codes to the protocol.

Error

Description

Requests
TopicExistsTopic with this name already exists.CreateTopic
InvalidTopic (existing)Topic name contains invalid characters or doesn't exist.CreateTopic, AlterTopic, DeleteTopic
InvalidPartitionsPartitions field is invalid (e.g. negative or increasing number of partitions in existing topic)CreateTopic, AlterTopic
InvalidReplicationFactorReplicationFactor field is invalid (e.g. negative)CreateTopic, AlterTopic
InvalidReplicaAssignmentReplicaAssignment field is invalid (e.g. contains duplicates)

CreateTopic, AlterTopic

InvalidConfiguration

Either topic-level config setting or value is incorrect.

CreateTopic

Generally, a client should have enough context to provide descriptive error message.

The same notation as in  A Guide To The Kafka Protocol is used here. 

Metadata Schema

Metadata Request (

...

version 1)

 

MetadataRequest => [topics] 
Stays the same as version 0
Metadata Response (version 1)

 

MetadataResponse => [brokers] [topic_metadata] 
  brokers => node_id host port rack is_controller 
    node_id => INT32
    host => STRING
    port => INT32
    rack => NULLABLE_STRING
    is_controller => BOOLEAN
  topic_metadata => topic_error_code topic is_internal marked_for_deletion [partition_metadata] 
    topic_error_code => INT16
    topic => STRING
    is_internal => BOOLEAN
    marked_for_deletion => BOOLEAN
    partition_metadata => partition_error_code partition_id leader [replicas] [isr] 
      partition_error_code => INT16
      partition_id => INT32
      leader => INT32

Adds rack, is_controller, is_internal and marked for deletion to the version 0 response.

...