Module schema_registry_converter::schema_registry_common [−][src]
Contains structs, enums' and functions common to async and blocking implementation of schema registry. So stuff dealing with the responses from schema registry, determining the subject, etc.
Structs
RegisteredReference | |
RegisteredSchema | Schema as retrieved from the schema registry. It's close to the json received and doesn't do type specific transformations. |
SuppliedReference | The schema registry supports sub schema's they will be stored separately in the schema registry |
SuppliedSchema | Schema as it might be provided to create messages, they will be added to th schema registry if not already present |
Enums
BytesResult | Intermediate result to just handle the byte transformation. When used in a decoder just the id might me enough because the resolved schema is cashed already. |
SchemaType | By default the schema registry supports three types. It's possible there will be more in the future or to add your own. Therefore the other is one of the schema types. |
SubjectNameStrategy | Strategy similar to the one in the Java client. By default schema's needs to be backwards compatible. Historically the only available strategy was the TopicNameStrategy. This meant in practice that a topic could only have one type, or the restriction on backwards compatibility was to be abandoned. Using either of the two other strategies allows multiple types of schema on on topic, while still being able to keep the restriction on schema's being backwards compatible. Depending on the strategy, either the topic, whether the value is used as key, the fully qualified name (only for RecordNameStrategy), or the schema needs to be provided. |
Functions
get_bytes_result | Just analyses the bytes which are contained in the key or value of an kafka record. When valid it will return the id and the data bytes. The way schema registry messages are encoded is starting with a zero, with the next 4 bytes having the id. The other bytes are the encoded message. |
get_payload | Creates payload that can be included as a key or value on a kafka record |
get_subject | Gets the subject part which is also used as key to cache the results. It's constructed so that it's compatible with the Java client. |