Versions Compared

Key

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

...

A new type needs to be added to transfer quota values. Since the protocol classes in Kafka already utilize ByteBuffers it is logical to use their functionality for serializing doubles. The serialization is basically a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout. The ByteBuffer serializer writes eight bytes containing the given double value, in Big Endian byte order, into this buffer at the current position, and then increments the position by eight.

The implementation will be defined in org.apache.kafka.common.protocol.types with the other protocol types as on 8 bytes (as in IEEE 754) and it will have no default value much like the other types available in the protocol.

 Describe Quotas

The justification for a new protocol is that a quota is quite different from a broker or topic config because a quota can sometimes be identified a simple user, client or even a (user,client) tuple while a topic or a broker config can be identified only by the topic's name or the broker's ID. Moreover quotas have their own well defined types.

...