pub struct MessageSpec {
pub name: String,
pub message_type: MessageType,
pub api_key: Option<i16>,
pub valid_versions: VersionRange,
pub latest_version_unstable: bool,
pub flexible_versions: FlexibleVersions,
pub fields: Vec<FieldSpec>,
pub common_structs: Vec<CommonStruct>,
pub internal: bool,
}Expand description
One parsed Kafka message schema.
Fields§
§name: String§message_type: MessageType§api_key: Option<i16>§valid_versions: VersionRange§latest_version_unstable: boolKafka’s latestVersionUnstable. When it is true, the highest version in
valid_versions is still in development. A Kafka broker advertises that
version only with unstable.api.versions.enable, and a Kafka client
never picks it. The key is optional in the schema, and Kafka reads a
missing key as false.
flexible_versions: FlexibleVersions§fields: Vec<FieldSpec>§common_structs: Vec<CommonStruct>§internal: boolkrabka-internal RPC with no upstream Apache Kafka equivalent, for
example the KIP-966 GetReplicaLogInfo controller↔broker RPC. The JVM
differential sweep excludes such messages, because the oracle has no
matching message class and krabka owns their wire shape outright.
Implementations§
Source§impl MessageSpec
impl MessageSpec
Sourcepub fn latest_stable_version(&self) -> i16
pub fn latest_stable_version(&self) -> i16
The highest version that a client can send, which is Kafka’s
ApiMessageType.highestSupportedVersion(false).
It is one less than valid_versions.max when the latest version is
unstable. The result is less than valid_versions.min when the only
version is unstable. Kafka reads that as “no enabled version”.