Versions Compared

Key

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

Table of Contents

Status

Current state: Under DiscussionImplemented

Discussion thread: Here

JIRA: KAFKA-4462

...

No public RPCs will be changed or created.  No new public methods will be added to clients.  A new public exception, ObsoleteVersionException, will be created.

There will be a new command which allows system administrators to find out what RPCs versions all brokers in the cluster support.  It will make an ApiVersionRequest to each broker, and then print out the results.  This may be useful for debugging and troubleshooting version compatibility issues.

The new command will be called BrokerVersionCommand.  It will print out broker versions on the command line.  The format will show the version range for each broker, as follows:

cmccabe@aurora:~/src/kafka> ./bin/kafka-broker-versions.sh --bootstrap-server localhost:9092 --listApiVersions
aurora:9092 (id: 0 rack: null) -> {
Produce(0): 0 to 2,
Fetch(1): 0 to 3,
Offsets(2): 0 to 1,
Metadata(3): 0 to 2,
LeaderAndIsr(4): 0,
StopReplica(5): 0,
UpdateMetadata(6): 0 to 2,
ControlledShutdown(7): 1,
OffsetCommit(8): 0 to 2,
OffsetFetch(9): 0 to 1,
GroupCoordinator(10): 0,
JoinGroup(11): 0 to 1,
Heartbeat(12): 0,
LeaveGroup(13): 0,
SyncGroup(14): 0,
DescribeGroups(15): 0,
ListGroups(16): 0,
SaslHandshake(17): 0,
ApiVersions(18): 0,
CreateTopics(19): 0,
DeleteTopics(20): 0
}

Migration Plan and Compatibility

...

In the future, we might consider adding an API whereby clients can specify which features that they needed when connecting to the broker.  This would allow clients to know which features they were getting up-front, rather than learning later.  For example, a client could specify that it needs ListOffsetRequestV1 support in order to start up.  Or the client could specify that it needs exactly-once semantics in order to start up.

 If we ever need to update to a new, incomptible version of the SaslHandshakeRequest, we could use this mechanism to do so.  The client would simply make the ApiVersionsRequest call before setting up SASL.  This will probably not be necessary, since the current SaslHandshakeRequest is fairly flexible.  However, it is an option in the future if we need it.