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.

CreateTopicRequest, AlterTopicRequest, DeleteTopicRequest

Error

Description

Requests
TopicAlreadyExistsTopic with this name already exists.CreateTopicRequestCreate
InvalidTopic (existing)InvalidArgumentTopicNameTopic name contains invalid characters.CreateTopicRequestCreate, Alter, Delete
InvalidPartitionsInvalidArgumentPartitionsEither partition field is invalid (e.g. negative)CreateTopicRequestCreate, AlterTopicRequest Alter
InvalidArgumentReplicationFactorInvalidReplicationFactorEither replication-factor field is invalid (e.g. negative)CreateTopicRequestCreate, AlterTopicRequestAlter
InvalidArgumentReplicaAssignmentInvalidReplicaAssignmentEither replication assignment field is invalid (e.g. contains duplicates)

CreateTopicRequestCreate, AlterTopicRequest Alter

InvalidArgumentTopicConfigInvalidTopicConfiguration

Either topic-level config setting or value is incorrect.

CreateTopicRequestCreate, AlterTopicRequest Alter
DecreasePartitionsNotAllowedInvalid partitions argument: decreasing partitions is prohibited when altering topic.AlterTopicRequest
PreferredReplicaLeaderElectionInProgressPreferred replica leader election procedure has been already started.PreferredReplicaLeaderElectionRequest
Alter
ReassignPartitionsInProgressReassign partitions procedure has been already started.AlterTopicRequest
MultipleInstructionsForOneTopicOnly one mutation is allowed at once: e.g. change topic replication factor or change topic config.CreateTopic, AlterTopicRequest
MultipleTopicInstructionsInOneBatchMultiple topic instructions for the same topic in one batch requestAlter

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. 

...