Avro and the Schema Registry
Add a Schema Registry to a Kafka broker (see Connecting to brokers) and Marshall decodes Avro messages framed the Confluent way: a zero byte, then the 4-byte schema id, then the record.
What you see
Decoded records show as JSON, so everything that works on JSON works on them: the record view, the shape objection and search.
- Records, enums, arrays, maps, unions, fixed and named types are decoded.
- Logical types are shown for a person: timestamps as ISO 8601 dates, decimals as the number they are.
Each schema is fetched once by id and cached; a schema the registry does not have is remembered too, so a topic full of one unknown id does not hammer the registry.
When it cannot decode
Each failure is named, because each sends you somewhere different:
| Failure | Look at |
|---|---|
| Not configured | The broker has no registry URL |
| Unreachable | The URL, the network |
| Unauthorized | The registry user and password |
| Not found | The schema id is not in this registry |
| Bad schema | The registry returned a schema Marshall cannot parse |
Messages that could not be decoded are not matched as text by search, and are never sent to Ask your topic.
Limits
- Avro only. Protobuf and JSON Schema from the registry are not decoded yet.
- Marshall does not re-encode Avro when producing. Filing a decoded record back as a corrected copy is refused, because it would put JSON on a topic every consumer reads as Avro.
