Versions Compared

Key

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

...

New Protocol Errors

It is proposed to add these error codes to the protocol.

Error

Description

Requests
TopicAlreadyExistsTopic with this name already exists.CreateTopicRequest
InvalidArgumentTopicNameTopic name contains invalid charactersCreateTopicRequest
InvalidArgumentPartitionsEither partition field is invalid (e.g. negative), or not defined when needed.CreateTopicRequest, AlterTopicRequest
InvalidArgumentReplicationFactorEither replication-factor field is invalid (e.g. negative), or not defined when needed.CreateTopicRequest,AlterTopicRequest
InvalidArgumentReplicaAssignmentEither replication-factor field is invalid (e.g. contains duplicates), or not defined when needed.

CreateTopicRequest, AlterTopicRequest

InvalidArgumentTopicConfig

Either topic-level config setting or value is incorrect.

CreateTopicRequest, AlterTopicRequest
DecreasePartitionsNotAllowedInvalid partitions argument: decreasing partitions is prohibited when altering topic.AlterTopicRequest
PreferredReplicaLeaderElectionInProgressPreferred replica leader election procedure has been already started.PreferredReplicaLeaderElectionRequest
ReassignPartitionsInProgressReassign partitions procedure has been already started.AlterTopicRequest
MultipleInstructionsForOneTopicOnly one mutation is allowed at once: e.g. change topic replication factor or change topic configCreateTopic, AlterTopicRequest
MultipleTopicInstructionsInOnebatchMultiple topic instructions for the same topic in one batch requestCreateTopicRequest, AlterTopicRequest, DeleteTopicRequest

Generally, the Admin Client (see section 3) or another request dispatcher should have enough context to provide descriptive error message.

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

...