Package com.aim2be.platform.schema
Enum Class WireFormat
- All Implemented Interfaces:
Serializable,Comparable<WireFormat>,Constable
On-wire schema-ID prefix encoding (ADR-0011 §B).
Kafka records carrying schema-registered payloads must declare WHICH schema produced their bytes. Two industry conventions exist:
APICURIO_8_BYTE— Apicurio's native layout:[globalId : 8 bytes big-endian]followed by the payload. Selected when the producer talks to an Apicurio registry directly and consumers know to skip 8 bytes before decoding.CONFLUENT_4_BYTE— Confluent's legacy layout:[0x00 magic][schemaId : 4 bytes big-endian]followed by the payload. Selected when the producer needs to be wire-compatible with existing Confluent serdes on the consumer side (the OBJ-71 hedge from .planning/26-stage-b-outbox-parity.md §0 row L-19).
Per ADR-0011 §B the platform defaults to APICURIO_8_BYTE; the
4-byte variant is the "Confluent if missed" fallback the registry decision
left open. Switching all producers between formats is a 1-bean config
change in SchemaRegistryAutoConfiguration, not a code rewrite.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionApicurio native: 8-byte big-endian globalId prefix.Confluent legacy: 0x00 magic byte + 4-byte big-endian schemaId. -
Method Summary
Modifier and TypeMethodDescriptionstatic WireFormatReturns the enum constant of this class with the specified name.static WireFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
APICURIO_8_BYTE
Apicurio native: 8-byte big-endian globalId prefix.+--------+--------+--------+--------+--------+--------+--------+--------+----------+ | globalId : long (big-endian, 8 bytes) | payload... | +--------+--------+--------+--------+--------+--------+--------+--------+----------+
-
CONFLUENT_4_BYTE
Confluent legacy: 0x00 magic byte + 4-byte big-endian schemaId.+--------+--------+--------+--------+--------+----------+ | 0x00 | schemaId : int (big-endian, 4 bytes) | payload... | +--------+--------+--------+--------+--------+----------+
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-